pub struct TargetData<'a>(/* private fields */);
Expand description
LLVMTargetData wrapper
Implementations§
Source§impl<'a> TargetData<'a>
impl<'a> TargetData<'a>
Sourcepub fn new(s: impl AsRef<str>) -> Result<TargetData<'a>, Error>
pub fn new(s: impl AsRef<str>) -> Result<TargetData<'a>, Error>
Create new target data with the given triple
Sourcepub fn string_rep(&self) -> Message
pub fn string_rep(&self) -> Message
Return a string representation
Sourcepub fn byte_order(&self) -> ByteOrder
pub fn byte_order(&self) -> ByteOrder
Get configured byte order
Sourcepub fn pointer_size(&self) -> usize
pub fn pointer_size(&self) -> usize
Get configured pointer size
Sourcepub fn pointer_size_for_address_space(&self, addr_space: usize) -> usize
pub fn pointer_size_for_address_space(&self, addr_space: usize) -> usize
Get pointer size for the given address space
Sourcepub fn int_ptr_type(&self, ctx: &Context<'a>) -> Result<Type<'a>, Error>
pub fn int_ptr_type(&self, ctx: &Context<'a>) -> Result<Type<'a>, Error>
Get the type used for integer pointers
Sourcepub fn int_ptr_type_for_address_space(
&self,
ctx: &Context<'a>,
addr_space: usize,
) -> Result<Type<'a>, Error>
pub fn int_ptr_type_for_address_space( &self, ctx: &Context<'a>, addr_space: usize, ) -> Result<Type<'a>, Error>
Get the type used for integer pointers in the given address space
Sourcepub fn size_of_type_in_bits(&self, t: impl AsRef<Type<'a>>) -> usize
pub fn size_of_type_in_bits(&self, t: impl AsRef<Type<'a>>) -> usize
Get the size of a type in bits
Sourcepub fn store_size_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
pub fn store_size_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
Get the storage size of a type
Sourcepub fn abi_size_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
pub fn abi_size_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
Get the ABI size of a type
Sourcepub fn abi_alignment_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
pub fn abi_alignment_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
Get the ABI alignment of a type
Sourcepub fn call_frame_alignment_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
pub fn call_frame_alignment_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
Get the call frame alignment of a type
Sourcepub fn preferred_alignment_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
pub fn preferred_alignment_of_type(&self, t: impl AsRef<Type<'a>>) -> usize
Get type’s preferred alignment
Sourcepub fn preferred_alignment_of_global(&self, t: impl AsRef<Value<'a>>) -> usize
pub fn preferred_alignment_of_global(&self, t: impl AsRef<Value<'a>>) -> usize
Get preferred alignment for a global value
Trait Implementations§
Source§impl<'a> Drop for TargetData<'a>
impl<'a> Drop for TargetData<'a>
Source§impl<'a> LLVM<LLVMOpaqueTargetData> for TargetData<'a>
impl<'a> LLVM<LLVMOpaqueTargetData> for TargetData<'a>
Source§fn llvm(&self) -> *mut LLVMOpaqueTargetData
fn llvm(&self) -> *mut LLVMOpaqueTargetData
Return a LLVM pointer
Auto Trait Implementations§
impl<'a> Freeze for TargetData<'a>
impl<'a> RefUnwindSafe for TargetData<'a>
impl<'a> !Send for TargetData<'a>
impl<'a> !Sync for TargetData<'a>
impl<'a> Unpin for TargetData<'a>
impl<'a> UnwindSafe for TargetData<'a>
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