[][src]Enum llvm_ir::types::Type

pub enum Type {
    VoidType,
    IntegerType {
        bits: u32,
    },
    PointerType {
        pointee_type: TypeRef,
        addr_space: AddrSpace,
    },
    FPType(FPType),
    FuncType {
        result_type: TypeRef,
        param_types: Vec<TypeRef>,
        is_var_arg: bool,
    },
    VectorType {
        element_type: TypeRef,
        num_elements: usize,
    },
    ArrayType {
        element_type: TypeRef,
        num_elements: usize,
    },
    StructType {
        element_types: Vec<TypeRef>,
        is_packed: bool,
    },
    NamedStructType {
        name: String,
    },
    X86_MMXType,
    MetadataType,
    LabelType,
    TokenType,
}

Variants

VoidType
IntegerType

Fields of IntegerType

bits: u32
PointerType

Fields of PointerType

pointee_type: TypeRefaddr_space: AddrSpace
FPType(FPType)
FuncType

Fields of FuncType

result_type: TypeRefparam_types: Vec<TypeRef>is_var_arg: bool
VectorType

Vector types (along with integer, FP, pointer, and X86_MMX types) are "first class types", which means they can be produced by instructions (see LLVM 10 docs on First Class Types). See LLVM 10 docs on Vector Type

Fields of VectorType

element_type: TypeRefnum_elements: usize
ArrayType

Struct and Array types (but not vector types) are "aggregate types" and cannot be produced by a single instruction (see LLVM 10 docs on Aggregate Types). See LLVM 10 docs on Array Type

Fields of ArrayType

element_type: TypeRefnum_elements: usize
StructType

The StructType variant is used for a "literal" (i.e., anonymous) structure type. See LLVM 10 docs on Structure Type

Fields of StructType

element_types: Vec<TypeRef>is_packed: bool
NamedStructType

Named structure types. Note that these may be self-referential (i.e., recursive). See LLVM 10 docs on Structure Type To get the actual definition of a named structure type, use module.types.named_struct_def().

Fields of NamedStructType

name: String

Name of the struct type

X86_MMXType
MetadataType
LabelType

LabelType is the type of BasicBlock labels. See LLVM 10 docs on Label Type

TokenType

Trait Implementations

impl AsRef<Type> for TypeRef[src]

impl Clone for Type[src]

impl Debug for Type[src]

impl Eq for Type[src]

impl From<FPType> for Type[src]

impl Hash for Type[src]

impl PartialEq<Type> for Type[src]

impl StructuralEq for Type[src]

impl StructuralPartialEq for Type[src]

impl Typed for Type[src]

Auto Trait Implementations

impl RefUnwindSafe for Type

impl Send for Type

impl Sync for Type

impl Unpin for Type

impl UnwindSafe for Type

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.