Mercurial > hg > CbC > CbC_llvm
diff llvm/bindings/ocaml/linker/linker_ocaml.c @ 252:1f2b6ac9f198 llvm-original
LLVM16-1
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 18 Aug 2023 09:04:13 +0900 |
parents | 79ff65ed7e25 |
children |
line wrap: on
line diff
--- a/llvm/bindings/ocaml/linker/linker_ocaml.c Wed Nov 09 17:47:54 2022 +0900 +++ b/llvm/bindings/ocaml/linker/linker_ocaml.c Fri Aug 18 09:04:13 2023 +0900 @@ -15,18 +15,19 @@ |* *| \*===----------------------------------------------------------------------===*/ +#include "caml/alloc.h" +#include "caml/callback.h" +#include "caml/fail.h" +#include "caml/memory.h" +#include "llvm_ocaml.h" #include "llvm-c/Core.h" #include "llvm-c/Linker.h" -#include "caml/alloc.h" -#include "caml/memory.h" -#include "caml/fail.h" -#include "caml/callback.h" void llvm_raise(value Prototype, char *Message); /* llmodule -> llmodule -> unit */ -value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src) { - if (LLVMLinkModules2(Dst, Src)) +value llvm_link_modules(value Dst, value Src) { + if (LLVMLinkModules2(Module_val(Dst), Module_val(Src))) llvm_raise(*caml_named_value("Llvm_linker.Error"), LLVMCreateMessage("Linking failed"));