1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Remove LLVMGetTargetMachineData leftovers.

llvm-svn: 260720
This commit is contained in:
Benjamin Kramer 2016-02-12 20:26:46 +00:00
parent 94fe44f7a0
commit f375282672
5 changed files with 0 additions and 28 deletions

View File

@ -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

View File

@ -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

View File

@ -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));

View File

@ -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);

View File

@ -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