summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2014-10-30 08:30:12 +0000
committerPeter Zotov <whitequark@whitequark.org>2014-10-30 08:30:12 +0000
commit4a693065769fe061c172520d006da67025285a62 (patch)
tree3e498c94da7a0980fa032d08c7b4a9a2a715eb77
parente75657b72708519df2a1a165d9ac748819df2d37 (diff)
downloadbcm5719-llvm-4a693065769fe061c172520d006da67025285a62.tar.gz
bcm5719-llvm-4a693065769fe061c172520d006da67025285a62.zip
[OCaml] Expose LLVMCloneModule.
llvm-svn: 220903
-rw-r--r--llvm/bindings/ocaml/llvm/llvm.ml1
-rw-r--r--llvm/bindings/ocaml/llvm/llvm.mli3
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/bindings/ocaml/llvm/llvm.ml b/llvm/bindings/ocaml/llvm/llvm.ml
index 8df34378b79..0df4d40c0a2 100644
--- a/llvm/bindings/ocaml/llvm/llvm.ml
+++ b/llvm/bindings/ocaml/llvm/llvm.ml
@@ -313,6 +313,7 @@ external mdkind_id : llcontext -> string -> llmdkind = "llvm_mdkind_id"
(*===-- Modules -----------------------------------------------------------===*)
external create_module : llcontext -> string -> llmodule = "llvm_create_module"
external dispose_module : llmodule -> unit = "llvm_dispose_module"
+external clone_module : llmodule -> llmodule = "LLVMCloneModule"
external target_triple: llmodule -> string
= "llvm_target_triple"
external set_target_triple: string -> llmodule -> unit
diff --git a/llvm/bindings/ocaml/llvm/llvm.mli b/llvm/bindings/ocaml/llvm/llvm.mli
index e6514327128..e5e90c33f4a 100644
--- a/llvm/bindings/ocaml/llvm/llvm.mli
+++ b/llvm/bindings/ocaml/llvm/llvm.mli
@@ -431,6 +431,9 @@ val create_module : llcontext -> string -> llmodule
[llvm::Module::~Module]. *)
val dispose_module : llmodule -> unit
+(** [clone_module m] returns an exact copy of module [m]. *)
+val clone_module : llmodule -> llmodule
+
(** [target_triple m] is the target specifier for the module [m], something like
[i686-apple-darwin8]. See the method [llvm::Module::getTargetTriple]. *)
val target_triple: llmodule -> string
OpenPOWER on IntegriCloud