summaryrefslogtreecommitdiffstats
path: root/bindings/ocaml/linker/llvm_linker.mli
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/ocaml/linker/llvm_linker.mli')
-rw-r--r--bindings/ocaml/linker/llvm_linker.mli27
1 files changed, 27 insertions, 0 deletions
diff --git a/bindings/ocaml/linker/llvm_linker.mli b/bindings/ocaml/linker/llvm_linker.mli
new file mode 100644
index 0000000..9752b65
--- /dev/null
+++ b/bindings/ocaml/linker/llvm_linker.mli
@@ -0,0 +1,27 @@
+(*===-- llvm_linker.mli - LLVM OCaml Interface -----------------*- OCaml -*-===*
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===*)
+
+(** Linker.
+
+ This interface provides an OCaml API for LLVM bitcode linker,
+ the classes in the Linker library. *)
+
+exception Error of string
+
+(** Linking mode. *)
+module Mode : sig
+ type t =
+ | DestroySource
+ | PreserveSource
+end
+
+(** [link_modules dst src mode] links [src] into [dst], raising [Error]
+ if the linking fails. *)
+external link_modules : Llvm.llmodule -> Llvm.llmodule -> Mode.t -> unit
+ = "llvm_link_modules" \ No newline at end of file