Struct llvm_ir::types::Types [−][src]
Holds a reference to all of the Types used in the Module, and facilitates
lookups so you can get a TypeRef to the Type you want.
Implementations
impl Types[src]
pub fn type_of<T: Typed + ?Sized>(&self, t: &T) -> TypeRef[src]
Get the type of anything that is Typed
pub fn void(&self) -> TypeRef[src]
Get the void type
pub fn int(&self, bits: u32) -> TypeRef[src]
Get the integer type of the specified size (in bits)
pub fn bool(&self) -> TypeRef[src]
Get the boolean type (i1)
pub fn i8(&self) -> TypeRef[src]
Get the 8-bit integer type
pub fn i16(&self) -> TypeRef[src]
Get the 16-bit integer type
pub fn i32(&self) -> TypeRef[src]
Get the 32-bit integer type
pub fn i64(&self) -> TypeRef[src]
Get the 64-bit integer type
pub fn pointer_to(&self, pointee_type: TypeRef) -> TypeRef[src]
Get a pointer type in the default address space (0)
pub fn pointer_in_addr_space(
&self,
pointee_type: TypeRef,
addr_space: AddrSpace
) -> TypeRef[src]
&self,
pointee_type: TypeRef,
addr_space: AddrSpace
) -> TypeRef
Get a pointer type in the specified address space
pub fn fp(&self, fpt: FPType) -> TypeRef[src]
Get a floating-point type
pub fn single(&self) -> TypeRef[src]
Get the single-precision floating-point type
pub fn double(&self) -> TypeRef[src]
Get the double-precision floating-point type
pub fn func_type(
&self,
result_type: TypeRef,
param_types: Vec<TypeRef>,
is_var_arg: bool
) -> TypeRef[src]
&self,
result_type: TypeRef,
param_types: Vec<TypeRef>,
is_var_arg: bool
) -> TypeRef
Get a function type
pub fn vector_of(
&self,
element_type: TypeRef,
num_elements: usize,
scalable: bool
) -> TypeRef[src]
&self,
element_type: TypeRef,
num_elements: usize,
scalable: bool
) -> TypeRef
Get a vector type
pub fn array_of(&self, element_type: TypeRef, num_elements: usize) -> TypeRef[src]
Get an array type
pub fn struct_of(&self, element_types: Vec<TypeRef>, is_packed: bool) -> TypeRef[src]
Get a struct type
pub fn named_struct(&self, name: &str) -> Option<TypeRef>[src]
Get the TypeRef for the struct with the given name, or
None if there is no struct by that name.
Note that this gives a NamedStructType.
To get the actual definition of a named struct (the NamedStructDef),
use named_struct_def().
pub fn named_struct_def(&self, name: &str) -> Option<&NamedStructDef>[src]
Get the NamedStructDef for the struct with the given name, or
None if there is no struct by that name.
Note that this gives a NamedStructDef.
To get the NamedStructType for a name, use named_struct().
pub fn all_struct_names(&self) -> impl Iterator<Item = &String>[src]
Get the names of all the named structs
pub fn x86_mmx(&self) -> TypeRef[src]
Get the X86_MMX type
pub fn x86_amx(&self) -> TypeRef[src]
Get the X86_AMX type
pub fn metadata_type(&self) -> TypeRef[src]
Get the metadata type
pub fn label_type(&self) -> TypeRef[src]
Get the label type
pub fn token_type(&self) -> TypeRef[src]
Get the token type
pub fn get_for_type(&self, ty: &Type) -> TypeRef[src]
Get a TypeRef for the given Type
impl Types[src]
pub fn blank_for_testing() -> Self[src]
Get a blank Types containing essentially no types.
This function is intended only for use in testing;
it's probably not useful otherwise.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Types[src]
impl Send for Types[src]
impl Sync for Types[src]
impl Unpin for Types[src]
impl UnwindSafe for Types[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,