From 801c887f01a76530a01d26579e3b5e36d9238b53 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 31 Jul 2011 01:12:39 +0000 Subject: [PATCH] Remove InvalidateStructLayoutInfo from the ocaml bindings. llvm-svn: 136582 --- bindings/ocaml/target/llvm_target.ml | 2 -- bindings/ocaml/target/llvm_target.mli | 7 ------- bindings/ocaml/target/target_ocaml.c | 7 ------- test/Bindings/Ocaml/target.ml | 1 - 4 files changed, 17 deletions(-) diff --git a/bindings/ocaml/target/llvm_target.ml b/bindings/ocaml/target/llvm_target.ml index ea5341d5e8b..49940eec480 100644 --- a/bindings/ocaml/target/llvm_target.ml +++ b/bindings/ocaml/target/llvm_target.ml @@ -20,8 +20,6 @@ module TargetData = struct external add : t -> [ unit = "llvm_targetdata_add" external as_string : t -> string = "llvm_targetdata_as_string" - external invalidate_struct_layout : t -> Llvm.lltype -> unit - = "llvm_targetdata_invalidate_struct_layout" external dispose : t -> unit = "llvm_targetdata_dispose" end diff --git a/bindings/ocaml/target/llvm_target.mli b/bindings/ocaml/target/llvm_target.mli index a82e1b684fa..c288b9ac2d9 100644 --- a/bindings/ocaml/target/llvm_target.mli +++ b/bindings/ocaml/target/llvm_target.mli @@ -35,13 +35,6 @@ module TargetData : sig See the constructor llvm::TargetData::TargetData. *) external as_string : t -> string = "llvm_targetdata_as_string" - (** Struct layouts are speculatively cached. If a TargetDataRef is alive when - types are being refined and removed, this method must be called whenever a - struct type is removed to avoid a dangling pointer in this cache. - See the method llvm::TargetData::InvalidateStructLayoutInfo. *) - external invalidate_struct_layout : t -> Llvm.lltype -> unit - = "llvm_targetdata_invalidate_struct_layout" - (** Deallocates a TargetData. See the destructor llvm::TargetData::~TargetData. *) external dispose : t -> unit = "llvm_targetdata_dispose" diff --git a/bindings/ocaml/target/target_ocaml.c b/bindings/ocaml/target/target_ocaml.c index cc20e8187a7..ca01e7786b6 100644 --- a/bindings/ocaml/target/target_ocaml.c +++ b/bindings/ocaml/target/target_ocaml.c @@ -37,13 +37,6 @@ CAMLprim value llvm_targetdata_as_string(LLVMTargetDataRef TD) { return Copy; } -/* TargetData.t -> Llvm.lltype -> unit */ -CAMLprim value llvm_targetdata_invalidate_struct_layout(LLVMTargetDataRef TD, - LLVMTypeRef Ty) { - LLVMInvalidateStructLayout(TD, Ty); - return Val_unit; -} - /* TargetData.t -> unit */ CAMLprim value llvm_targetdata_dispose(LLVMTargetDataRef TD) { LLVMDisposeTargetData(TD); diff --git a/test/Bindings/Ocaml/target.ml b/test/Bindings/Ocaml/target.ml index 5e3ab4bf935..1b6b71e2759 100644 --- a/test/Bindings/Ocaml/target.ml +++ b/test/Bindings/Ocaml/target.ml @@ -37,7 +37,6 @@ let test_target_data () = let sty = struct_type context [| i32_type; i64_type |] in ignore (TargetData.as_string td); - ignore (TargetData.invalidate_struct_layout td sty); ignore (byte_order td); ignore (pointer_size td); ignore (intptr_type td);