summaryrefslogtreecommitdiff
path: root/bindings/ocaml/linker/linker_ocaml.c
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/ocaml/linker/linker_ocaml.c')
-rw-r--r--bindings/ocaml/linker/linker_ocaml.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bindings/ocaml/linker/linker_ocaml.c b/bindings/ocaml/linker/linker_ocaml.c
index 498a5f0c8453b..08737bd5843c1 100644
--- a/bindings/ocaml/linker/linker_ocaml.c
+++ b/bindings/ocaml/linker/linker_ocaml.c
@@ -15,6 +15,7 @@
|* *|
\*===----------------------------------------------------------------------===*/
+#include "llvm-c/Core.h"
#include "llvm-c/Linker.h"
#include "caml/alloc.h"
#include "caml/memory.h"
@@ -26,7 +27,7 @@ void llvm_raise(value Prototype, char *Message);
/* llmodule -> llmodule -> unit */
CAMLprim value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src) {
if (LLVMLinkModules2(Dst, Src))
- llvm_raise(*caml_named_value("Llvm_linker.Error"), "Linking failed");
+ llvm_raise(*caml_named_value("Llvm_linker.Error"), LLVMCreateMessage("Linking failed"));
return Val_unit;
}