llvm.org GIT mirror llvm / 145384c
[OCaml] Reinstate data_layout Expose LLVMCreateTargetMachineData as data_layout. As r263530 did for go. From that commit: "LLVMGetTargetDataLayout was removed from the C API, and then TargetMachine.TargetData was removed. Later, LLVMCreateTargetMachineData was added to the C API" Differential Revision: http://reviews.llvm.org/D18677 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265115 91177308-0d34-0410-b5e6-96231b3b80d8 Jeroen Ketema 4 years ago
4 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
120120 = "llvm_targetmachine_cpu"
121121 external features : t -> string
122122 = "llvm_targetmachine_features"
123 external data_layout : t -> DataLayout.t
124 = "llvm_targetmachine_data_layout"
123125 external add_analysis_passes : [< Llvm.PassManager.any ] Llvm.PassManager.t -> t -> unit
124126 = "llvm_targetmachine_add_analysis_passes"
125127 external set_verbose_asm : bool -> t -> unit
193193 [llvm::TargetMachine::getCPU]. *)
194194 val cpu : t -> string
195195
196 (** Returns the data layout of this target machine. *)
197 val data_layout : t -> DataLayout.t
198
196199 (** Returns the feature string used while creating this target machine. See
197200 [llvm::TargetMachine::getFeatureString]. *)
198201 val features : t -> string
295295 TargetMachine_val(Machine)));
296296 }
297297
298 /* TargetMachine.t -> DataLayout.t */
299 CAMLprim value llvm_targetmachine_data_layout(value Machine) {
300 return llvm_alloc_data_layout(LLVMCreateTargetDataLayout(
301 TargetMachine_val(Machine)));
302 }
303
298304 /* bool -> TargetMachine.t -> unit */
299305 CAMLprim value llvm_targetmachine_set_verbose_asm(value Verb, value Machine) {
300306 LLVMSetTargetMachineAsmVerbosity(TargetMachine_val(Machine), Bool_val(Verb));
8080 assert_equal (TM.triple machine) (Target.default_triple ());
8181 assert_equal (TM.cpu machine) "";
8282 assert_equal (TM.features machine) "";
83 ignore (TM.data_layout machine);
8384 TM.set_verbose_asm true machine;
8485 let pm = PassManager.create () in
8586 TM.add_analysis_passes pm machine