module TargetMachine:sig..end
type t
val create : triple:string ->
?cpu:string ->
?features:string ->
?level:Llvm_target.CodeGenOptLevel.t ->
?reloc_mode:Llvm_target.RelocMode.t ->
?code_model:Llvm_target.CodeModel.t ->
Llvm_target.Target.t -> tCreates a new target machine.
See llvm::Target::createTargetMachine.
val target : t -> Llvm_target.Target.tReturns the Target used in a TargetMachine
val triple : t -> stringReturns the triple used while creating this target machine. See
llvm::TargetMachine::getTriple.
val cpu : t -> stringReturns the CPU used while creating this target machine. See
llvm::TargetMachine::getCPU.
val data_layout : t -> Llvm_target.DataLayout.tReturns the data layout of this target machine.
val features : t -> stringReturns the feature string used while creating this target machine. See
llvm::TargetMachine::getFeatureString.
val add_analysis_passes : [< Llvm.PassManager.any ] Llvm.PassManager.t ->
t -> unitAdds the target-specific analysis passes to the pass manager.
See llvm::TargetMachine::addAnalysisPasses.
val set_verbose_asm : bool -> t -> unitSets the assembly verbosity of this target machine.
See llvm::TargetMachine::setAsmVerbosity.
val emit_to_file : Llvm.llmodule ->
Llvm_target.CodeGenFileType.t ->
string -> t -> unitEmits assembly or object data for the given module to the given
file or raise Error.
val emit_to_memory_buffer : Llvm.llmodule ->
Llvm_target.CodeGenFileType.t ->
t -> Llvm.llmemorybufferEmits assembly or object data for the given module to a fresh memory
buffer or raise Error.