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" 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 #include +#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 : [ 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/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 : [ - 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/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; } -/* [ 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/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 ------------------------------------------------------------===*)