pub struct TargetMachine { /* private fields */ }
Expand description
A wrapper around a LLVMTargetMachineRef
Implementations§
Source§impl TargetMachine
impl TargetMachine
Sourcepub fn native() -> Result<TargetMachine, String>
pub fn native() -> Result<TargetMachine, String>
Creates a target machine with the native target triple and options
Sourcepub fn new(triple: String) -> Result<TargetMachine, String>
pub fn new(triple: String) -> Result<TargetMachine, String>
Creates a target machine with the default options
Sourcepub fn new_with_options(
triple: String,
cpu: String,
features: String,
level: OptLevel,
) -> Result<TargetMachine, String>
pub fn new_with_options( triple: String, cpu: String, features: String, level: OptLevel, ) -> Result<TargetMachine, String>
Creates a target machine with the given options
Sourcepub fn emit_module_to_file<P>(
&self,
module: &Module,
file: P,
file_type: FileType,
) -> Result<(), String>
pub fn emit_module_to_file<P>( &self, module: &Module, file: P, file_type: FileType, ) -> Result<(), String>
Emits code for a module to a given file with the given file type
Sourcepub fn data_layout(&self) -> TargetData
pub fn data_layout(&self) -> TargetData
Creates a data layout based on this target machine
Trait Implementations§
Source§impl Clone for TargetMachine
impl Clone for TargetMachine
Source§fn clone(&self) -> TargetMachine
fn clone(&self) -> TargetMachine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TargetMachine
impl Debug for TargetMachine
Auto Trait Implementations§
impl Freeze for TargetMachine
impl RefUnwindSafe for TargetMachine
impl !Send for TargetMachine
impl !Sync for TargetMachine
impl Unpin for TargetMachine
impl UnwindSafe for TargetMachine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more