[PATCH] D18633: Silence warnings in OCaml bindings
Jeroen Ketema via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 01:45:04 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL265001: Silence warnings in OCaml bindings (authored by jketema).
Changed prior to commit:
http://reviews.llvm.org/D18633?vs=52164&id=52180#toc
Repository:
rL LLVM
http://reviews.llvm.org/D18633
Files:
llvm/trunk/bindings/ocaml/analysis/analysis_ocaml.c
llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c
llvm/trunk/bindings/ocaml/target/llvm_target.ml
llvm/trunk/bindings/ocaml/target/llvm_target.mli
llvm/trunk/bindings/ocaml/target/target_ocaml.c
llvm/trunk/test/Bindings/OCaml/target.ml
Index: llvm/trunk/test/Bindings/OCaml/target.ml
===================================================================
--- llvm/trunk/test/Bindings/OCaml/target.ml
+++ llvm/trunk/test/Bindings/OCaml/target.ml
@@ -58,10 +58,7 @@
assert_equal (DL.preferred_align sty dl) 8;
assert_equal (DL.preferred_align_of_global (declare_global sty "g" m) dl) 8;
assert_equal (DL.element_at_offset sty (Int64.of_int 1) dl) 0;
- assert_equal (DL.offset_of_element sty 1 dl) (Int64.of_int 4);
-
- let pm = PassManager.create () in
- ignore (DL.add_to_pass_manager pm dl)
+ assert_equal (DL.offset_of_element sty 1 dl) (Int64.of_int 4)
(*===-- Target ------------------------------------------------------------===*)
Index: llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c
===================================================================
--- llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c
+++ llvm/trunk/bindings/ocaml/executionengine/executionengine_ocaml.c
@@ -17,6 +17,7 @@
#include <string.h>
#include <assert.h>
+#include "llvm-c/Core.h"
#include "llvm-c/ExecutionEngine.h"
#include "llvm-c/Target.h"
#include "caml/alloc.h"
Index: llvm/trunk/bindings/ocaml/target/llvm_target.ml
===================================================================
--- llvm/trunk/bindings/ocaml/target/llvm_target.ml
+++ llvm/trunk/bindings/ocaml/target/llvm_target.ml
@@ -54,9 +54,6 @@
external of_string : string -> t = "llvm_datalayout_of_string"
external as_string : t -> string = "llvm_datalayout_as_string"
- external add_to_pass_manager : [<Llvm.PassManager.any]
- Llvm.PassManager.t -> t -> unit
- = "llvm_datalayout_add_to_pass_manager"
external byte_order : t -> Endian.t = "llvm_datalayout_byte_order"
external pointer_size : t -> int = "llvm_datalayout_pointer_size"
external intptr_type : Llvm.llcontext -> t -> Llvm.lltype
Index: llvm/trunk/bindings/ocaml/target/target_ocaml.c
===================================================================
--- llvm/trunk/bindings/ocaml/target/target_ocaml.c
+++ llvm/trunk/bindings/ocaml/target/target_ocaml.c
@@ -15,6 +15,7 @@
|* *|
\*===----------------------------------------------------------------------===*/
+#include "llvm-c/Core.h"
#include "llvm-c/Target.h"
#include "llvm-c/TargetMachine.h"
#include "caml/alloc.h"
@@ -64,13 +65,6 @@
return Copy;
}
-/* [<Llvm.PassManager.any] Llvm.PassManager.t -> DataLayout.t -> unit */
-CAMLprim value llvm_datalayout_add_to_pass_manager(LLVMPassManagerRef PM,
- value DL) {
- LLVMAddTargetData(DataLayout_val(DL), PM);
- return Val_unit;
-}
-
/* DataLayout.t -> Endian.t */
CAMLprim value llvm_datalayout_byte_order(value DL) {
return Val_int(LLVMByteOrder(DataLayout_val(DL)));
Index: llvm/trunk/bindings/ocaml/target/llvm_target.mli
===================================================================
--- llvm/trunk/bindings/ocaml/target/llvm_target.mli
+++ llvm/trunk/bindings/ocaml/target/llvm_target.mli
@@ -67,12 +67,6 @@
See the method [llvm::DataLayout::getStringRepresentation]. *)
val as_string : t -> string
- (** [add_to_pass_manager pm dl] adds the data layout [dl] to
- the pass manager [pm].
- See the method [llvm::PassManagerBase::add]. *)
- val add_to_pass_manager : [<Llvm.PassManager.any] Llvm.PassManager.t ->
- t -> unit
-
(** Returns the byte order of a target, either [Endian.Big] or
[Endian.Little].
See the method [llvm::DataLayout::isLittleEndian]. *)
Index: llvm/trunk/bindings/ocaml/analysis/analysis_ocaml.c
===================================================================
--- llvm/trunk/bindings/ocaml/analysis/analysis_ocaml.c
+++ llvm/trunk/bindings/ocaml/analysis/analysis_ocaml.c
@@ -15,6 +15,7 @@
|* *|
\*===----------------------------------------------------------------------===*/
+#include "llvm-c/Core.h"
#include "llvm-c/Analysis.h"
#include "caml/alloc.h"
#include "caml/mlvalues.h"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18633.52180.patch
Type: text/x-patch
Size: 4239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160331/e08112da/attachment.bin>
More information about the llvm-commits
mailing list