[−][src]Struct inkwell::targets::TargetData
Methods
impl TargetData
[src]
pub fn ptr_sized_int_type(&self, address_space: Option<AddressSpace>) -> IntType
[src]
Gets the IntType
representing a bit width of a pointer. It will be assigned the global context.
Example
use inkwell::OptimizationLevel; use inkwell::context::Context; use inkwell::targets::{InitializationConfig, Target}; Target::initialize_native(&InitializationConfig::default()).expect("Failed to initialize native target"); let context = Context::get_global(); let module = context.create_module("sum"); let execution_engine = module.create_jit_execution_engine(OptimizationLevel::None).unwrap(); let target_data = execution_engine.get_target_data(); let int_type = target_data.ptr_sized_int_type(None);
pub fn ptr_sized_int_type_in_context(
&self,
context: &Context,
address_space: Option<AddressSpace>
) -> IntType
[src]
&self,
context: &Context,
address_space: Option<AddressSpace>
) -> IntType
Gets the IntType
representing a bit width of a pointer. It will be assigned the referenced context.
Example
use inkwell::OptimizationLevel; use inkwell::context::Context; use inkwell::targets::{InitializationConfig, Target}; Target::initialize_native(&InitializationConfig::default()).expect("Failed to initialize native target"); let context = Context::create(); let module = context.create_module("sum"); let execution_engine = module.create_jit_execution_engine(OptimizationLevel::None).unwrap(); let target_data = execution_engine.get_target_data(); let int_type = target_data.ptr_sized_int_type_in_context(&context, None);
pub fn get_data_layout(&self) -> DataLayout
[src]
pub fn get_bit_size(&self, type_: &dyn AnyType) -> u64
[src]
pub fn create(str_repr: &str) -> TargetData
[src]
pub fn get_byte_ordering(&self) -> ByteOrdering
[src]
pub fn get_pointer_byte_size(&self, address_space: Option<AddressSpace>) -> u32
[src]
pub fn get_store_size(&self, type_: &dyn AnyType) -> u64
[src]
pub fn get_abi_size(&self, type_: &dyn AnyType) -> u64
[src]
pub fn get_abi_alignment(&self, type_: &dyn AnyType) -> u32
[src]
pub fn get_call_frame_alignment(&self, type_: &dyn AnyType) -> u32
[src]
pub fn get_preferred_alignment(&self, type_: &dyn AnyType) -> u32
[src]
pub fn get_preferred_alignment_of_global(&self, value: &GlobalValue) -> u32
[src]
pub fn element_at_offset(&self, struct_type: &StructType, offset: u64) -> u32
[src]
pub fn offset_of_element(
&self,
struct_type: &StructType,
element: u32
) -> Option<u64>
[src]
&self,
struct_type: &StructType,
element: u32
) -> Option<u64>
Trait Implementations
impl Eq for TargetData
[src]
impl Drop for TargetData
[src]
impl PartialEq<TargetData> for TargetData
[src]
fn eq(&self, other: &TargetData) -> bool
[src]
fn ne(&self, other: &TargetData) -> bool
[src]
impl Debug for TargetData
[src]
Auto Trait Implementations
impl !Sync for TargetData
impl !Send for TargetData
impl Unpin for TargetData
impl UnwindSafe for TargetData
impl RefUnwindSafe for TargetData
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,