mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-17 13:51:21 +00:00
[OCaml] Rename link_modules' to link_modules
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
This commit is contained in:
parent
b472176829
commit
dddf66fd65
@ -10,5 +10,5 @@ exception Error of string
|
|||||||
|
|
||||||
let () = Callback.register_exception "Llvm_linker.Error" (Error "")
|
let () = Callback.register_exception "Llvm_linker.Error" (Error "")
|
||||||
|
|
||||||
external link_modules' : Llvm.llmodule -> Llvm.llmodule -> unit
|
external link_modules : Llvm.llmodule -> Llvm.llmodule -> unit
|
||||||
= "llvm_link_modules"
|
= "llvm_link_modules"
|
||||||
|
@ -13,6 +13,6 @@
|
|||||||
|
|
||||||
exception Error of string
|
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. *)
|
if the linking fails. The src module is destroyed. *)
|
||||||
val link_modules' : Llvm.llmodule -> Llvm.llmodule -> unit
|
val link_modules : Llvm.llmodule -> Llvm.llmodule -> unit
|
||||||
|
@ -43,18 +43,18 @@ let test_linker () =
|
|||||||
|
|
||||||
let m1 = make_module "one"
|
let m1 = make_module "one"
|
||||||
and m2 = make_module "two" in
|
and m2 = make_module "two" in
|
||||||
link_modules' m1 m2;
|
link_modules m1 m2;
|
||||||
dispose_module m1;
|
dispose_module m1;
|
||||||
|
|
||||||
let m1 = make_module "one"
|
let m1 = make_module "one"
|
||||||
and m2 = make_module "two" in
|
and m2 = make_module "two" in
|
||||||
link_modules' m1 m2;
|
link_modules m1 m2;
|
||||||
dispose_module m1;
|
dispose_module m1;
|
||||||
|
|
||||||
let m1 = make_module "one"
|
let m1 = make_module "one"
|
||||||
and m2 = make_module "one" in
|
and m2 = make_module "one" in
|
||||||
try
|
try
|
||||||
link_modules' m1 m2;
|
link_modules m1 m2;
|
||||||
failwith "must raise"
|
failwith "must raise"
|
||||||
with Error _ ->
|
with Error _ ->
|
||||||
dispose_module m1
|
dispose_module m1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user