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:
parent
94fe44f7a0
commit
f375282672
@ -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
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user