[llvm] r260720 - Remove LLVMGetTargetMachineData leftovers.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 12:26:46 PST 2016


Author: d0k
Date: Fri Feb 12 14:26:46 2016
New Revision: 260720

URL: http://llvm.org/viewvc/llvm-project?rev=260720&view=rev
Log:
Remove LLVMGetTargetMachineData leftovers.

Modified:
    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/include/llvm-c/TargetMachine.h
    llvm/trunk/test/Bindings/OCaml/target.ml

Modified: llvm/trunk/bindings/ocaml/target/llvm_target.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/target/llvm_target.ml?rev=260720&r1=260719&r2=260720&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/target/llvm_target.ml (original)
+++ llvm/trunk/bindings/ocaml/target/llvm_target.ml Fri Feb 12 14:26:46 2016
@@ -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

Modified: llvm/trunk/bindings/ocaml/target/llvm_target.mli
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/target/llvm_target.mli?rev=260720&r1=260719&r2=260720&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/target/llvm_target.mli (original)
+++ llvm/trunk/bindings/ocaml/target/llvm_target.mli Fri Feb 12 14:26:46 2016
@@ -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

Modified: llvm/trunk/bindings/ocaml/target/target_ocaml.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/target/target_ocaml.c?rev=260720&r1=260719&r2=260720&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/target/target_ocaml.c (original)
+++ llvm/trunk/bindings/ocaml/target/target_ocaml.c Fri Feb 12 14:26:46 2016
@@ -302,25 +302,6 @@ CAMLprim value llvm_targetmachine_featur
                                 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));

Modified: llvm/trunk/include/llvm-c/TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/TargetMachine.h?rev=260720&r1=260719&r2=260720&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/TargetMachine.h (original)
+++ llvm/trunk/include/llvm-c/TargetMachine.h Fri Feb 12 14:26:46 2016
@@ -115,9 +115,6 @@ char *LLVMGetTargetMachineCPU(LLVMTarget
   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);

Modified: llvm/trunk/test/Bindings/OCaml/target.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/OCaml/target.ml?rev=260720&r1=260719&r2=260720&view=diff
==============================================================================
--- llvm/trunk/test/Bindings/OCaml/target.ml (original)
+++ llvm/trunk/test/Bindings/OCaml/target.ml Fri Feb 12 14:26:46 2016
@@ -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




More information about the llvm-commits mailing list