pub trait Typed {
// Required method
fn get_type(&self, types: &Types) -> TypeRef;
}Expand description
The Typed trait is used for anything that has a Type.
Required Methods§
Implementations on Foreign Types§
Implementors§
impl Typed for Constant
impl Typed for Float
impl Typed for Instruction
The Type of an Instruction (or any subtype of Instruction) is its result type.
impl Typed for BinaryOp
impl Typed for UnaryOp
impl Typed for Operand
impl Typed for Terminator
The Type of a Terminator is its result type.
For most terminators, this is VoidType.
For instance, a Ret instruction has void type even if
the function returns a non-void value; we do not store the result of a Ret
instruction using something like %3 = ret i32 %2.
See LLVM 14 docs on Terminator Instructions