Struct llvm::TargetData
[−]
[src]
pub struct TargetData;
Represents an LLVM Target
Methods
impl TargetData
[src]
fn new(rep: &str) -> CBox<TargetData>
Create a target data from a target layout string.
fn is_big_endian(&self) -> bool
Returns true if the target is big endian.
fn get_pointer_size(&self) -> usize
Returns the size of a pointer on the target.
fn size_of_in_bits(&self, ty: &Type) -> u64
Returns the size of the type given in bits.
fn size_of(&self, ty: &Type) -> u64
Returns the size of the type given in bytes.
fn alignment_of(&self, ty: &Type) -> usize
Returns the alignment of the type given in bytes.
fn element_at(&self, struct_ty: &Type, offset: u64) -> usize
Computes the structure element that contains the byte offset for a target.
fn offset_of(&self, struct_ty: &Type, element: usize) -> u64
Compute the byte offset of an element in the struct type given.
fn as_str(&self) -> CBox<str>
Returns the string representation of this target data.
Trait Implementations
impl Eq for TargetData
[src]
impl PartialEq<TargetData> for TargetData
[src]
fn eq(&self, other: &TargetData) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<TargetData> for &'a TargetData
[src]
fn eq(&self, other: &TargetData) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> From<LLVMTargetDataRef> for &'a TargetData
[src]
fn from(ty: LLVMTargetDataRef) -> &'a TargetData
Performs the conversion.
impl<'a> From<LLVMTargetDataRef> for &'a mut TargetData
[src]
fn from(ty: LLVMTargetDataRef) -> &'a mut TargetData
Performs the conversion.
impl Display for TargetData
[src]
impl DisposeRef for TargetData
[src]
type RefTo = LLVMOpaqueTargetData
What a reference to this type represents as a C pointer.
unsafe fn dispose(ptr: LLVMTargetDataRef)
Destroy the contents at the pointer's location. Read more