Commit 434e956 renamed link_modules to link_modules' for unclear reasons.
Based on the commit's diff, the author possibly intended to have two
functions, link_modules to bind to LLVMLinkModules and link_modules' to
bind to LLVMLinkModules2. However, there is only one function. link_modules'
appears in LLVM 3.8 onwards.
Differential Revision: https://reviews.llvm.org/D153090
let () = Callback.register_exception "Llvm_linker.Error" (Error "")
-external link_modules' : Llvm.llmodule -> Llvm.llmodule -> unit
- = "llvm_link_modules"
+external link_modules : Llvm.llmodule -> Llvm.llmodule -> unit
+ = "llvm_link_modules"
exception Error of string
-(** [link_modules' dst src] links [src] into [dst], raising [Error]
+(** [link_modules dst src] links [src] into [dst], raising [Error]
if the linking fails. The src module is destroyed. *)
-val link_modules' : Llvm.llmodule -> Llvm.llmodule -> unit
\ No newline at end of file
+val link_modules : Llvm.llmodule -> Llvm.llmodule -> unit
let m1 = make_module "one"
and m2 = make_module "two" in
- link_modules' m1 m2;
+ link_modules m1 m2;
dispose_module m1;
let m1 = make_module "one"
and m2 = make_module "two" in
- link_modules' m1 m2;
+ link_modules m1 m2;
dispose_module m1;
let m1 = make_module "one"
and m2 = make_module "one" in
try
- link_modules' m1 m2;
+ link_modules m1 m2;
failwith "must raise"
with Error _ ->
dispose_module m1