summaryrefslogtreecommitdiffstats
path: root/llvm/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/bindings')
-rw-r--r--llvm/bindings/go/llvm/linker.go11
-rw-r--r--llvm/bindings/ocaml/linker/linker_ocaml.c6
-rw-r--r--llvm/bindings/ocaml/linker/llvm_linker.ml8
-rw-r--r--llvm/bindings/ocaml/linker/llvm_linker.mli9
4 files changed, 7 insertions, 27 deletions
diff --git a/llvm/bindings/go/llvm/linker.go b/llvm/bindings/go/llvm/linker.go
index 31e9ad24bf5..64d794efb94 100644
--- a/llvm/bindings/go/llvm/linker.go
+++ b/llvm/bindings/go/llvm/linker.go
@@ -20,16 +20,9 @@ package llvm
import "C"
import "errors"
-type LinkerMode C.LLVMLinkerMode
-
-const (
- LinkerDestroySource = C.LLVMLinkerDestroySource
- LinkerPreserveSource = C.LLVMLinkerPreserveSource
-)
-
-func LinkModules(Dest, Src Module, Mode LinkerMode) error {
+func LinkModules(Dest, Src Module) error {
var cmsg *C.char
- failed := C.LLVMLinkModules(Dest.C, Src.C, C.LLVMLinkerMode(Mode), &cmsg)
+ failed := C.LLVMLinkModules(Dest.C, Src.C, 0, &cmsg)
if failed != 0 {
err := errors.New(C.GoString(cmsg))
C.LLVMDisposeMessage(cmsg)
diff --git a/llvm/bindings/ocaml/linker/linker_ocaml.c b/llvm/bindings/ocaml/linker/linker_ocaml.c
index ed37777d852..3b8512aa595 100644
--- a/llvm/bindings/ocaml/linker/linker_ocaml.c
+++ b/llvm/bindings/ocaml/linker/linker_ocaml.c
@@ -23,11 +23,11 @@
void llvm_raise(value Prototype, char *Message);
-/* llmodule -> llmodule -> Mode.t -> unit */
-CAMLprim value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src, value Mode) {
+/* llmodule -> llmodule -> unit */
+CAMLprim value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src) {
char* Message;
- if (LLVMLinkModules(Dst, Src, Int_val(Mode), &Message))
+ if (LLVMLinkModules(Dst, Src, 0, &Message))
llvm_raise(*caml_named_value("Llvm_linker.Error"), Message);
return Val_unit;
diff --git a/llvm/bindings/ocaml/linker/llvm_linker.ml b/llvm/bindings/ocaml/linker/llvm_linker.ml
index 5854d70bb52..3044abd8b6c 100644
--- a/llvm/bindings/ocaml/linker/llvm_linker.ml
+++ b/llvm/bindings/ocaml/linker/llvm_linker.ml
@@ -11,11 +11,5 @@ exception Error of string
let () = Callback.register_exception "Llvm_linker.Error" (Error "")
-module Mode = struct
- type t =
- | DestroySource
- | PreserveSource
-end
-
-external link_modules : Llvm.llmodule -> Llvm.llmodule -> Mode.t -> unit
+external link_modules : Llvm.llmodule -> Llvm.llmodule -> unit
= "llvm_link_modules"
diff --git a/llvm/bindings/ocaml/linker/llvm_linker.mli b/llvm/bindings/ocaml/linker/llvm_linker.mli
index 4def7a8cc98..06c3b92a577 100644
--- a/llvm/bindings/ocaml/linker/llvm_linker.mli
+++ b/llvm/bindings/ocaml/linker/llvm_linker.mli
@@ -14,13 +14,6 @@
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. *)
-val link_modules : Llvm.llmodule -> Llvm.llmodule -> Mode.t -> unit \ No newline at end of file
+val link_modules : Llvm.llmodule -> Llvm.llmodule -> unit \ No newline at end of file
OpenPOWER on IntegriCloud