pub enum Type {
Show 13 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
PointerType
FPType(FPType)
FuncType
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 14 docs on First Class Types). See LLVM 14 docs on Vector Type
ArrayType
Struct and Array types (but not vector types) are “aggregate types” and cannot be produced by a single instruction (see LLVM 14 docs on Aggregate Types). See LLVM 14 docs on Array Type
StructType
The StructType
variant is used for a “literal” (i.e., anonymous) structure type.
See LLVM 14 docs on Structure Type
NamedStructType
Named structure types. Note that these may be self-referential (i.e., recursive).
See LLVM 14 docs on Structure Type
To get the actual definition of a named structure type, use module.types.named_struct_def()
.
X86_MMXType
MetadataType
LabelType
LabelType
is the type of BasicBlock
labels.
See LLVM 14 docs on Label Type
TokenType
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more