llvm.org GIT mirror llvm / 06016cc
Remove LLVMGetTargetMachineData leftovers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260720 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 4 years ago
5 changed file(s) with 0 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
123123 = "llvm_targetmachine_cpu"
124124 external features : t -> string
125125 = "llvm_targetmachine_features"
126 external data_layout : t -> DataLayout.t
127 = "llvm_targetmachine_data_layout"
128126 external add_analysis_passes : [< Llvm.PassManager.any ] Llvm.PassManager.t -> t -> unit
129127 = "llvm_targetmachine_add_analysis_passes"
130128 external set_verbose_asm : bool -> t -> unit
203203 [llvm::TargetMachine::getFeatureString]. *)
204204 val features : t -> string
205205
206 (** Returns the data layout of this target machine. *)
207 val data_layout : t -> DataLayout.t
208
209206 (** Adds the target-specific analysis passes to the pass manager.
210207 See [llvm::TargetMachine::addAnalysisPasses]. *)
211208 val add_analysis_passes : [< Llvm.PassManager.any ] Llvm.PassManager.t -> t -> unit
301301 TargetMachine_val(Machine)));
302302 }
303303
304 /* TargetMachine.t -> DataLayout.t */
305 CAMLprim value llvm_targetmachine_data_layout(value Machine) {
306 CAMLparam1(Machine);
307 CAMLlocal1(DataLayout);
308 char *TargetDataCStr;
309
310 /* LLVMGetTargetMachineData returns a pointer owned by the TargetMachine,
311 so it is impossible to wrap it with llvm_alloc_target_data, which assumes
312 that OCaml owns the pointer. */
313 LLVMTargetDataRef OrigDataLayout;
314 OrigDataLayout = LLVMGetTargetMachineData(TargetMachine_val(Machine));
315
316 TargetDataCStr = LLVMCopyStringRepOfTargetData(OrigDataLayout);
317 DataLayout = llvm_alloc_data_layout(LLVMCreateTargetData(TargetDataCStr));
318 LLVMDisposeMessage(TargetDataCStr);
319
320 CAMLreturn(DataLayout);
321 }
322
323304 /* bool -> TargetMachine.t -> unit */
324305 CAMLprim value llvm_targetmachine_set_verbose_asm(value Verb, value Machine) {
325306 LLVMSetTargetMachineAsmVerbosity(TargetMachine_val(Machine), Bool_val(Verb));
114114 LLVMDisposeMessage. */
115115 char *LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T);
116116
117 /** Returns the llvm::DataLayout used for this llvm:TargetMachine. */
118 LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T);
119
120117 /** Set the target machine's ASM verbosity. */
121118 void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T,
122119 LLVMBool VerboseAsm);
8383 assert_equal (TM.triple machine) (Target.default_triple ());
8484 assert_equal (TM.cpu machine) "";
8585 assert_equal (TM.features machine) "";
86 ignore (TM.data_layout machine);
8786 TM.set_verbose_asm true machine;
8887 let pm = PassManager.create () in
8988 TM.add_analysis_passes pm machine