Struct llvm::Type [] [src]

pub struct Type(_);

Defines how a value should be laid out in memory.

Methods

impl Type
[src]

fn get<'a, T>(context: &'a Context) -> &'a Type where T: Compile<'a>

Get the type given as an LLVM type descriptor in the context given.

fn is_sized(&self) -> bool

Returns true if the size of the type is known at compile-time.

This is equivalent to the type implementing Sized in Rust

fn is_function(&self) -> bool

Returns true if this type is a function.

This is equivalent to FunctionType::is.

fn is_struct(&self) -> bool

Returns true if this type is a struct.

This is equivalent to StructType::is.

fn is_void(&self) -> bool

Returns true if this type is void.

fn is_pointer(&self) -> bool

Returns true if this type is a pointer.

This is equivalent to PointerType::is.

fn is_integer(&self) -> bool

Returns true if this type is an integer.

fn is_float(&self) -> bool

Returns true if this type is any floating-point number.

fn get_size(&self, target: &TargetData) -> usize

Returns the size of the type in bytes.

Trait Implementations

impl Eq for Type
[src]

impl PartialEq<Type> for Type
[src]

fn eq(&self, other: &Type) -> 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<Type> for &'a Type
[src]

fn eq(&self, other: &Type) -> 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<LLVMTypeRef> for &'a Type
[src]

fn from(ty: LLVMTypeRef) -> &'a Type

Performs the conversion.

impl<'a> From<LLVMTypeRef> for &'a mut Type
[src]

fn from(ty: LLVMTypeRef) -> &'a mut Type

Performs the conversion.

impl GetContext for Type
[src]

fn get_context(&self) -> &Context

Returns a reference to the context that owns this value. Read more

impl Debug for Type
[src]

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.