TypeΒΆ
The Type class for the IR library of LLVM. Instances of the Type class are immutable.
For more informations about the Type Class, you can read the LLVM documentation for Type.
getVoidTy
Return an instance of a
VoidType (builtin type that is always available).static Type *getVoidTy(LLVMContext &C);
IntegerType
Class to represent integer types. Note that this class is also used to represent the built-in integer types: Int1Ty, Int8Ty, Int16Ty, Int32Ty and Int64Ty. Integer representation type, it inherits from Type class.
More about the class IntegerType class.
class IntegerType : public Type{...};
getInt32Ty
Int32Ty is the instance of an IntegerType. Return the instance of
Int32Type (builtin type that is always available).static IntegerType *getInt32Ty(LLVMContext &C);
PointerType
Class to represent pointers, inherits from Type class. More about the class PointerType class.
class PointerType : public Type{...};
PointerType::getUnqualThis constructs a pointer to an object of the specified type in the generic address space (address space zero).
static PointerType *getUnqual(Type *ElementType);
getInt32PtrTy
Convenience method for getting pointer type with the builtin type
Int32as pointee.
AScorresponding to AddrSpace, is optional.static IntegerType *getInt32PtrTy(LLVMContext &C, unsigned AS = 0);
getInt8PtrTy
Convenience method for getting pointer type with the builtin type
Int8as pointee.
AScorresponding to AddrSpace, is optional.static PointerType *getInt8PtrTy(LLVMContext &C, unsigned AS = 0);
StructType
Class to represent struct types. There are two different kinds of struct Literal structs and Identified structs. Literal Struct must have a body when they are created, and are uniqued, they can not be recursive Identified Struct are not uniqued, they are managed by LLVMContext.
For more information about literal struct avec identified struct you can go check out LLVM Documentation about Structure Type.
It inherits from Type class.
More about the class StructType class.
class StructType : public Type{...};
StructType::createThis creates an identified struct.
static StructType *create(LLVMContext &Context);
FunctionType
Class to represent function types. It inherits from Type Class. More about the class FunctionType class.
class FunctionType : public Type{...};
FunctionType::getThis static method is the primary way of constructing a FunctionType.
Resultrepresents the type for the return value of the Function.
Paramsrepresents the parameters of the Function
isVarArgtrue if the function takes a variable number of argumentsstatic FunctionType *get(Type *Result, ArrayRef<Type*> Params, bool isVarArg);