[OCaml] Rename link_modules' to link_modules
authorAlan Hu <alanh@ccs.neu.edu>
Fri, 16 Jun 2023 00:56:39 +0000 (20:56 -0400)
committerAlan Hu <alanh@ccs.neu.edu>
Fri, 16 Jun 2023 13:18:26 +0000 (09:18 -0400)
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

llvm/bindings/ocaml/linker/llvm_linker.ml
llvm/bindings/ocaml/linker/llvm_linker.mli
llvm/test/Bindings/OCaml/linker.ml

index e61e8fc..0952d0e 100644 (file)
@@ -10,5 +10,5 @@ exception Error of string
 
 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"
index ed8f0b3..4300b3b 100644 (file)
@@ -13,6 +13,6 @@
 
 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
index 81d7e9b..6375be8 100644 (file)
@@ -43,18 +43,18 @@ let test_linker () =
 
   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