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

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,
        scalable: bool,
    },
    ArrayType {
        element_type: TypeRef,
        num_elements: usize,
    },
    StructType {
        element_types: Vec<TypeRef>,
        is_packed: bool,
    },
    NamedStructType {
        name: String,
    },
    X86_MMXType,
    X86_AMXType,
    MetadataType,
    LabelType,
    TokenType,
}

See LLVM 12 docs on Type System

Variants

VoidType

See LLVM 12 docs on Void Type

IntegerType

See LLVM 12 docs on Integer Type

Fields of IntegerType

bits: u32
PointerType

See LLVM 12 docs on Pointer Type

Fields of PointerType

pointee_type: TypeRefaddr_space: AddrSpace
FPType(FPType)

See LLVM 12 docs on Floating-Point Types

FuncType

See LLVM 12 docs on Function Type

Fields of FuncType

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

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

Fields of VectorType

element_type: TypeRefnum_elements: usizescalable: bool
ArrayType

Struct and Array types (but not vector types) are "aggregate types" and cannot be produced by a single instruction (see LLVM 12 docs on Aggregate Types). See LLVM 12 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 12 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 12 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

See LLVM 12 docs on X86_MMX Type

X86_AMXType
MetadataType

See LLVM 12 docs on Metadata Type

LabelType

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

TokenType

See LLVM 12 docs on Token Type

Trait Implementations

impl AsRef<Type> for TypeRef[src]

impl Clone for Type[src]

impl Debug for Type[src]

impl Display 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[src]

impl Send for Type[src]

impl Sync for Type[src]

impl Unpin for Type[src]

impl UnwindSafe for Type[src]

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> ToString for T where
    T: Display + ?Sized
[src]

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.