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

pub enum Type {
Show variants 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,
}
Expand description

Variants

VoidType
IntegerType
Show fields

Fields of IntegerType

bits: u32
PointerType
Show fields

Fields of PointerType

pointee_type: TypeRefaddr_space: AddrSpace
FPType(FPType)
FuncType
Show fields

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

Show fields

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 12 docs on Aggregate Types). See LLVM 12 docs on Array Type

Show fields

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

Show fields

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().

Show fields

Fields of NamedStructType

name: String

Name of the struct type

X86_MMXType
MetadataType
LabelType

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

TokenType

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.