From 56d13e893749b5cc0d649fafd265ab52b1336e84 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 12 Feb 2016 20:26:46 +0000 Subject: [PATCH] Remove LLVMGetTargetMachineData leftovers. llvm-svn: 260720 --- llvm/bindings/ocaml/target/llvm_target.ml | 2 -- llvm/bindings/ocaml/target/llvm_target.mli | 3 --- llvm/bindings/ocaml/target/target_ocaml.c | 19 ------------------- llvm/include/llvm-c/TargetMachine.h | 3 --- llvm/test/Bindings/OCaml/target.ml | 1 - 5 files changed, 28 deletions(-) diff --git a/llvm/bindings/ocaml/target/llvm_target.ml b/llvm/bindings/ocaml/target/llvm_target.ml index bd7388e..d4910ac 100644 --- a/llvm/bindings/ocaml/target/llvm_target.ml +++ b/llvm/bindings/ocaml/target/llvm_target.ml @@ -124,8 +124,6 @@ module TargetMachine = struct = "llvm_targetmachine_cpu" external features : t -> string = "llvm_targetmachine_features" - external data_layout : t -> DataLayout.t - = "llvm_targetmachine_data_layout" external add_analysis_passes : [< Llvm.PassManager.any ] Llvm.PassManager.t -> t -> unit = "llvm_targetmachine_add_analysis_passes" external set_verbose_asm : bool -> t -> unit diff --git a/llvm/bindings/ocaml/target/llvm_target.mli b/llvm/bindings/ocaml/target/llvm_target.mli index 676bc61..e826d5c 100644 --- a/llvm/bindings/ocaml/target/llvm_target.mli +++ b/llvm/bindings/ocaml/target/llvm_target.mli @@ -204,9 +204,6 @@ module TargetMachine : sig [llvm::TargetMachine::getFeatureString]. *) val features : t -> string - (** Returns the data layout of this target machine. *) - val data_layout : t -> DataLayout.t - (** Adds the target-specific analysis passes to the pass manager. See [llvm::TargetMachine::addAnalysisPasses]. *) val add_analysis_passes : [< Llvm.PassManager.any ] Llvm.PassManager.t -> t -> unit diff --git a/llvm/bindings/ocaml/target/target_ocaml.c b/llvm/bindings/ocaml/target/target_ocaml.c index 8f77cb4..acc45da 100644 --- a/llvm/bindings/ocaml/target/target_ocaml.c +++ b/llvm/bindings/ocaml/target/target_ocaml.c @@ -302,25 +302,6 @@ CAMLprim value llvm_targetmachine_features(value Machine) { TargetMachine_val(Machine))); } -/* TargetMachine.t -> DataLayout.t */ -CAMLprim value llvm_targetmachine_data_layout(value Machine) { - CAMLparam1(Machine); - CAMLlocal1(DataLayout); - char *TargetDataCStr; - - /* LLVMGetTargetMachineData returns a pointer owned by the TargetMachine, - so it is impossible to wrap it with llvm_alloc_target_data, which assumes - that OCaml owns the pointer. */ - LLVMTargetDataRef OrigDataLayout; - OrigDataLayout = LLVMGetTargetMachineData(TargetMachine_val(Machine)); - - TargetDataCStr = LLVMCopyStringRepOfTargetData(OrigDataLayout); - DataLayout = llvm_alloc_data_layout(LLVMCreateTargetData(TargetDataCStr)); - LLVMDisposeMessage(TargetDataCStr); - - CAMLreturn(DataLayout); -} - /* bool -> TargetMachine.t -> unit */ CAMLprim value llvm_targetmachine_set_verbose_asm(value Verb, value Machine) { LLVMSetTargetMachineAsmVerbosity(TargetMachine_val(Machine), Bool_val(Verb)); diff --git a/llvm/include/llvm-c/TargetMachine.h b/llvm/include/llvm-c/TargetMachine.h index 3037080..e6c34dd 100644 --- a/llvm/include/llvm-c/TargetMachine.h +++ b/llvm/include/llvm-c/TargetMachine.h @@ -115,9 +115,6 @@ char *LLVMGetTargetMachineCPU(LLVMTargetMachineRef T); LLVMDisposeMessage. */ char *LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T); -/** Returns the llvm::DataLayout used for this llvm:TargetMachine. */ -LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T); - /** Set the target machine's ASM verbosity. */ void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T, LLVMBool VerboseAsm); diff --git a/llvm/test/Bindings/OCaml/target.ml b/llvm/test/Bindings/OCaml/target.ml index 68ba75d..c756f67 100644 --- a/llvm/test/Bindings/OCaml/target.ml +++ b/llvm/test/Bindings/OCaml/target.ml @@ -84,7 +84,6 @@ let test_target_machine () = assert_equal (TM.triple machine) (Target.default_triple ()); assert_equal (TM.cpu machine) ""; assert_equal (TM.features machine) ""; - ignore (TM.data_layout machine); TM.set_verbose_asm true machine; let pm = PassManager.create () in TM.add_analysis_passes pm machine -- 2.7.4