class Type
Declaration
class Type { /* full declaration omitted */ };
Description
The instances of the Type class are immutable: once they are created, they are never changed. Also note that only one instance of a particular type is ever created. Thus seeing if two types are equal is a matter of doing a trivial pointer comparison. To enforce that no two equal instances are created, Type instances can only be created via static factory methods in class Type and in derived classes. Once allocated, Types are never free'd.
Declared at: llvm/include/llvm/IR/Type.h:46
Member Variables
- protected unsigned int NumContainedTys = 0
- Keeps track of how many Type*'s there are in the ContainedTys list.
- protected llvm::Type* const* ContainedTys = nullptr
- A pointer to the array of Types contained by this Type. For example, this includes the arguments of a function type, the elements of a structure, the pointee of a pointer, the element type of an array, etc. This pointer may be 0 for types that don't contain other types (Integer, Double, Float).
Method Overview
- protected Type(llvm::LLVMContext & C, llvm::Type::TypeID tid)
- public bool canLosslesslyBitCastTo(llvm::Type * Ty) const
- public void dump() const
- public llvm::Type * getArrayElementType() const
- public inline uint64_t getArrayNumElements() const
- public llvm::Type * getContainedType(unsigned int i) const
- public llvm::LLVMContext & getContext() const
- public static llvm::PointerType * getDoublePtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::Type * getDoubleTy(llvm::LLVMContext & C)
- public inline llvm::Type * getExtendedType() const
- public static llvm::PointerType * getFP128PtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::Type * getFP128Ty(llvm::LLVMContext & C)
- public int getFPMantissaWidth() const
- public static llvm::PointerType * getFloatPtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::Type * getFloatTy(llvm::LLVMContext & C)
- public const llvm::fltSemantics & getFltSemantics() const
- public inline unsigned int getFunctionNumParams() const
- public inline llvm::Type * getFunctionParamType(unsigned int i) const
- public static llvm::PointerType * getHalfPtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::Type * getHalfTy(llvm::LLVMContext & C)
- public static llvm::IntegerType * getInt128Ty(llvm::LLVMContext & C)
- public static llvm::PointerType * getInt16PtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::IntegerType * getInt16Ty(llvm::LLVMContext & C)
- public static llvm::PointerType * getInt1PtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::IntegerType * getInt1Ty(llvm::LLVMContext & C)
- public static llvm::PointerType * getInt32PtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::IntegerType * getInt32Ty(llvm::LLVMContext & C)
- public static llvm::PointerType * getInt64PtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::IntegerType * getInt64Ty(llvm::LLVMContext & C)
- public static llvm::PointerType * getInt8PtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::IntegerType * getInt8Ty(llvm::LLVMContext & C)
- public static llvm::PointerType * getIntNPtrTy(llvm::LLVMContext & C, unsigned int N, unsigned int AS = 0)
- public static llvm::IntegerType * getIntNTy(llvm::LLVMContext & C, unsigned int N)
- public inline unsigned int getIntegerBitWidth() const
- public static llvm::Type * getLabelTy(llvm::LLVMContext & C)
- public static llvm::Type * getMetadataTy(llvm::LLVMContext & C)
- public unsigned int getNumContainedTypes() const
- public static llvm::PointerType * getPPC_FP128PtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::Type * getPPC_FP128Ty(llvm::LLVMContext & C)
- public inline unsigned int getPointerAddressSpace() const
- public llvm::Type * getPointerElementType() const
- public llvm::PointerType * getPointerTo(unsigned int AddrSpace = 0) const
- public llvm::TypeSize getPrimitiveSizeInBits() const
- public static llvm::Type * getPrimitiveType(llvm::LLVMContext & C, llvm::Type::TypeID IDNumber)
- public unsigned int getScalarSizeInBits() const
- public template <typename ScalarTy>static llvm::Type * getScalarTy(llvm::LLVMContext & C)
- public llvm::Type * getScalarType() const
- public inline llvm::Type * getSequentialElementType() const
- public inline llvm::Type * getStructElementType(unsigned int N) const
- public inline llvm::StringRef getStructName() const
- public inline unsigned int getStructNumElements() const
- protected unsigned int getSubclassData() const
- public static llvm::Type * getTokenTy(llvm::LLVMContext & C)
- public llvm::Type::TypeID getTypeID() const
- public inline llvm::ElementCount getVectorElementCount() const
- public llvm::Type * getVectorElementType() const
- public inline bool getVectorIsScalable() const
- public inline unsigned int getVectorNumElements() const
- public static llvm::Type * getVoidTy(llvm::LLVMContext & C)
- public inline llvm::Type * getWithNewBitWidth(unsigned int NewBitWidth) const
- public static llvm::PointerType * getX86_FP80PtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::Type * getX86_FP80Ty(llvm::LLVMContext & C)
- public static llvm::PointerType * getX86_MMXPtrTy(llvm::LLVMContext & C, unsigned int AS = 0)
- public static llvm::Type * getX86_MMXTy(llvm::LLVMContext & C)
- public bool isAggregateType() const
- public bool isArrayTy() const
- public bool isDoubleTy() const
- public bool isEmptyTy() const
- public bool isFP128Ty() const
- public bool isFPOrFPVectorTy() const
- public bool isFirstClassType() const
- public bool isFloatTy() const
- public bool isFloatingPointTy() const
- public bool isFunctionTy() const
- public inline bool isFunctionVarArg() const
- public bool isHalfTy() const
- public bool isIntOrIntVectorTy(unsigned int BitWidth) const
- public bool isIntOrIntVectorTy() const
- public bool isIntOrPtrTy() const
- public bool isIntegerTy(unsigned int Bitwidth) const
- public bool isIntegerTy() const
- public bool isLabelTy() const
- public bool isMetadataTy() const
- public bool isPPC_FP128Ty() const
- public bool isPointerTy() const
- public bool isPtrOrPtrVectorTy() const
- protected static bool isSequentialType(llvm::Type::TypeID TyID)
- public bool isSingleValueType() const
- public bool isSized(SmallPtrSetImpl<llvm::Type *> * Visited = nullptr) const
- public bool isStructTy() const
- public bool isTokenTy() const
- public bool isVectorTy() const
- public bool isVoidTy() const
- public bool isX86_FP80Ty() const
- public bool isX86_MMXTy() const
- public void print(llvm::raw_ostream & O, bool IsForDebug = false, bool NoDetails = false) const
- protected void setSubclassData(unsigned int val)
- public llvm::Type::subtype_iterator subtype_begin() const
- public llvm::Type::subtype_iterator subtype_end() const
- public llvm::Type::subtype_reverse_iterator subtype_rbegin() const
- public llvm::Type::subtype_reverse_iterator subtype_rend() const
- public ArrayRef<llvm::Type *> subtypes() const
- protected ~Type()
Methods
¶Type(llvm::LLVMContext& C, llvm::Type::TypeID tid)
Type(llvm::LLVMContext& C, llvm::Type::TypeID tid)
Declared at: llvm/include/llvm/IR/Type.h:91
Parameters
- llvm::LLVMContext& C
- llvm::Type::TypeID tid
¶bool canLosslesslyBitCastTo(llvm::Type* Ty) const
bool canLosslesslyBitCastTo(llvm::Type* Ty) const
Description
Return true if this type could be converted with a lossless BitCast to type 'Ty'. For example, i8* to i32*. BitCasts are valid for types of the same size only where no re-interpretation of the bits is done. Determine if this type could be losslessly bitcast to Ty
Declared at: llvm/include/llvm/IR/Type.h:236
Parameters
- llvm::Type* Ty
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/IR/Type.h:127
¶llvm::Type* getArrayElementType() const
llvm::Type* getArrayElementType() const
Declared at: llvm/include/llvm/IR/Type.h:368
¶inline uint64_t getArrayNumElements() const
inline uint64_t getArrayNumElements() const
Declared at: llvm/include/llvm/IR/Type.h:366
¶llvm::Type* getContainedType(unsigned int i) const
llvm::Type* getContainedType(unsigned int i) const
Description
This method is used to implement the type iterator (defined at the end of the file). For derived types, this returns the types 'contained' in the derived type.
Declared at: llvm/include/llvm/IR/Type.h:336
Parameters
- unsigned int i
¶llvm::LLVMContext& getContext() const
llvm::LLVMContext& getContext() const
Description
Return the LLVMContext in which this type was uniqued.
Declared at: llvm/include/llvm/IR/Type.h:130
¶static llvm::PointerType* getDoublePtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getDoublePtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:447
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::Type* getDoubleTy(
llvm::LLVMContext& C)
static llvm::Type* getDoubleTy(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:412
Parameters
¶inline llvm::Type* getExtendedType() const
inline llvm::Type* getExtendedType() const
Description
Given scalar/vector integer type, returns a type with elements twice as wide as in the original type. For vectors, preserves element count.
Declared at: llvm/include/llvm/IR/Type.h:392
¶static llvm::PointerType* getFP128PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getFP128PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:449
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::Type* getFP128Ty(
llvm::LLVMContext& C)
static llvm::Type* getFP128Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:415
Parameters
¶int getFPMantissaWidth() const
int getFPMantissaWidth() const
Description
Return the width of the mantissa of this type. This is only valid on floating-point types. If the FP type does not have a stable mantissa (e.g. ppc long double), this method returns -1.
Declared at: llvm/include/llvm/IR/Type.h:303
¶static llvm::PointerType* getFloatPtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getFloatPtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:446
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::Type* getFloatTy(
llvm::LLVMContext& C)
static llvm::Type* getFloatTy(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:411
Parameters
¶const llvm::fltSemantics& getFltSemantics() const
const llvm::fltSemantics& getFltSemantics() const
Declared at: llvm/include/llvm/IR/Type.h:169
¶inline unsigned int getFunctionNumParams() const
inline unsigned int getFunctionNumParams() const
Declared at: llvm/include/llvm/IR/Type.h:354
¶inline llvm::Type* getFunctionParamType(
unsigned int i) const
inline llvm::Type* getFunctionParamType(
unsigned int i) const
Declared at: llvm/include/llvm/IR/Type.h:353
Parameters
- unsigned int i
¶static llvm::PointerType* getHalfPtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getHalfPtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:445
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::Type* getHalfTy(llvm::LLVMContext& C)
static llvm::Type* getHalfTy(llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:410
Parameters
¶static llvm::IntegerType* getInt128Ty(
llvm::LLVMContext& C)
static llvm::IntegerType* getInt128Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:425
Parameters
¶static llvm::PointerType* getInt16PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getInt16PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:455
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::IntegerType* getInt16Ty(
llvm::LLVMContext& C)
static llvm::IntegerType* getInt16Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:422
Parameters
¶static llvm::PointerType* getInt1PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getInt1PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:453
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::IntegerType* getInt1Ty(
llvm::LLVMContext& C)
static llvm::IntegerType* getInt1Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:420
Parameters
¶static llvm::PointerType* getInt32PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getInt32PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:456
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::IntegerType* getInt32Ty(
llvm::LLVMContext& C)
static llvm::IntegerType* getInt32Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:423
Parameters
¶static llvm::PointerType* getInt64PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getInt64PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:457
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::IntegerType* getInt64Ty(
llvm::LLVMContext& C)
static llvm::IntegerType* getInt64Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:424
Parameters
¶static llvm::PointerType* getInt8PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getInt8PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:454
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::IntegerType* getInt8Ty(
llvm::LLVMContext& C)
static llvm::IntegerType* getInt8Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:421
Parameters
¶static llvm::PointerType* getIntNPtrTy(
llvm::LLVMContext& C,
unsigned int N,
unsigned int AS = 0)
static llvm::PointerType* getIntNPtrTy(
llvm::LLVMContext& C,
unsigned int N,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:452
Parameters
- llvm::LLVMContext& C
- unsigned int N
- unsigned int AS = 0
¶static llvm::IntegerType* getIntNTy(
llvm::LLVMContext& C,
unsigned int N)
static llvm::IntegerType* getIntNTy(
llvm::LLVMContext& C,
unsigned int N)
Declared at: llvm/include/llvm/IR/Type.h:419
Parameters
- llvm::LLVMContext& C
- unsigned int N
¶inline unsigned int getIntegerBitWidth() const
inline unsigned int getIntegerBitWidth() const
Declared at: llvm/include/llvm/IR/Type.h:351
¶static llvm::Type* getLabelTy(
llvm::LLVMContext& C)
static llvm::Type* getLabelTy(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:409
Parameters
¶static llvm::Type* getMetadataTy(
llvm::LLVMContext& C)
static llvm::Type* getMetadataTy(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:413
Parameters
¶unsigned int getNumContainedTypes() const
unsigned int getNumContainedTypes() const
Description
Return the number of types in the derived type.
Declared at: llvm/include/llvm/IR/Type.h:342
¶static llvm::PointerType* getPPC_FP128PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getPPC_FP128PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:450
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::Type* getPPC_FP128Ty(
llvm::LLVMContext& C)
static llvm::Type* getPPC_FP128Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:416
Parameters
¶inline unsigned int getPointerAddressSpace() const
inline unsigned int getPointerAddressSpace() const
Description
Get the address space of this pointer or pointer vector type.
Declared at: llvm/include/llvm/IR/Type.h:395
¶llvm::Type* getPointerElementType() const
llvm::Type* getPointerElementType() const
Declared at: llvm/include/llvm/IR/Type.h:381
¶llvm::PointerType* getPointerTo(
unsigned int AddrSpace = 0) const
llvm::PointerType* getPointerTo(
unsigned int AddrSpace = 0) const
Description
Return a pointer to the current type. This is equivalent to PointerType::get(Foo, AddrSpace).
Declared at: llvm/include/llvm/IR/Type.h:461
Parameters
- unsigned int AddrSpace = 0
¶llvm::TypeSize getPrimitiveSizeInBits() const
llvm::TypeSize getPrimitiveSizeInBits() const
Description
Return the basic size of this type if it is a primitive type. These are fixed by LLVM and are not target-dependent. This will return zero if the type does not have a size or is not a primitive type. If this is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size. Note that this may not reflect the size of memory allocated for an instance of the type or the number of bytes that are written when an instance of the type is stored to memory. The DataLayout class provides additional query functions to provide this information.
Declared at: llvm/include/llvm/IR/Type.h:293
¶static llvm::Type* getPrimitiveType(
llvm::LLVMContext& C,
llvm::Type::TypeID IDNumber)
static llvm::Type* getPrimitiveType(
llvm::LLVMContext& C,
llvm::Type::TypeID IDNumber)
Description
Return a type based on an identifier.
Declared at: llvm/include/llvm/IR/Type.h:403
Parameters
- llvm::LLVMContext& C
- llvm::Type::TypeID IDNumber
¶unsigned int getScalarSizeInBits() const
unsigned int getScalarSizeInBits() const
Description
If this is a vector type, return the getPrimitiveSizeInBits value for the element type. Otherwise return the getPrimitiveSizeInBits value for this type.
Declared at: llvm/include/llvm/IR/Type.h:298
¶template <typename ScalarTy>
static llvm::Type* getScalarTy(
llvm::LLVMContext& C)
template <typename ScalarTy>
static llvm::Type* getScalarTy(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:426
Templates
- ScalarTy
Parameters
¶llvm::Type* getScalarType() const
llvm::Type* getScalarType() const
Description
If this is a vector type, return the element type, otherwise return 'this'.
Declared at: llvm/include/llvm/IR/Type.h:307
¶inline llvm::Type* getSequentialElementType()
const
inline llvm::Type* getSequentialElementType()
const
Declared at: llvm/include/llvm/IR/Type.h:361
¶inline llvm::Type* getStructElementType(
unsigned int N) const
inline llvm::Type* getStructElementType(
unsigned int N) const
Declared at: llvm/include/llvm/IR/Type.h:359
Parameters
- unsigned int N
¶inline llvm::StringRef getStructName() const
inline llvm::StringRef getStructName() const
Declared at: llvm/include/llvm/IR/Type.h:357
¶inline unsigned int getStructNumElements() const
inline unsigned int getStructNumElements() const
Declared at: llvm/include/llvm/IR/Type.h:358
¶unsigned int getSubclassData() const
unsigned int getSubclassData() const
Declared at: llvm/include/llvm/IR/Type.h:95
¶static llvm::Type* getTokenTy(
llvm::LLVMContext& C)
static llvm::Type* getTokenTy(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:418
Parameters
¶llvm::Type::TypeID getTypeID() const
llvm::Type::TypeID getTypeID() const
Description
Return the type id for the type. This will return one of the TypeID enum elements defined above.
Declared at: llvm/include/llvm/IR/Type.h:138
¶inline llvm::ElementCount getVectorElementCount()
const
inline llvm::ElementCount getVectorElementCount()
const
Declared at: llvm/include/llvm/IR/Type.h:375
¶llvm::Type* getVectorElementType() const
llvm::Type* getVectorElementType() const
Declared at: llvm/include/llvm/IR/Type.h:376
¶inline bool getVectorIsScalable() const
inline bool getVectorIsScalable() const
Declared at: llvm/include/llvm/IR/Type.h:373
¶inline unsigned int getVectorNumElements() const
inline unsigned int getVectorNumElements() const
Declared at: llvm/include/llvm/IR/Type.h:374
¶static llvm::Type* getVoidTy(llvm::LLVMContext& C)
static llvm::Type* getVoidTy(llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:408
Parameters
¶inline llvm::Type* getWithNewBitWidth(
unsigned int NewBitWidth) const
inline llvm::Type* getWithNewBitWidth(
unsigned int NewBitWidth) const
Description
Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes.
Declared at: llvm/include/llvm/IR/Type.h:388
Parameters
- unsigned int NewBitWidth
¶static llvm::PointerType* getX86_FP80PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getX86_FP80PtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:448
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::Type* getX86_FP80Ty(
llvm::LLVMContext& C)
static llvm::Type* getX86_FP80Ty(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:414
Parameters
¶static llvm::PointerType* getX86_MMXPtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
static llvm::PointerType* getX86_MMXPtrTy(
llvm::LLVMContext& C,
unsigned int AS = 0)
Declared at: llvm/include/llvm/IR/Type.h:451
Parameters
- llvm::LLVMContext& C
- unsigned int AS = 0
¶static llvm::Type* getX86_MMXTy(
llvm::LLVMContext& C)
static llvm::Type* getX86_MMXTy(
llvm::LLVMContext& C)
Declared at: llvm/include/llvm/IR/Type.h:417
Parameters
¶bool isAggregateType() const
bool isAggregateType() const
Description
Return true if the type is an aggregate type. This means it is valid as the first operand of an insertvalue or extractvalue instruction. This includes struct and array types, but does not include vector types.
Declared at: llvm/include/llvm/IR/Type.h:258
¶bool isArrayTy() const
bool isArrayTy() const
Description
True if this is an instance of ArrayType.
Declared at: llvm/include/llvm/IR/Type.h:221
¶bool isDoubleTy() const
bool isDoubleTy() const
Description
Return true if this is 'double', a 64-bit IEEE fp type.
Declared at: llvm/include/llvm/IR/Type.h:150
¶bool isEmptyTy() const
bool isEmptyTy() const
Description
Return true if this type is empty, that is, it has no elements or all of its elements are empty.
Declared at: llvm/include/llvm/IR/Type.h:240
¶bool isFP128Ty() const
bool isFP128Ty() const
Description
Return true if this is 'fp128'.
Declared at: llvm/include/llvm/IR/Type.h:156
¶bool isFPOrFPVectorTy() const
bool isFPOrFPVectorTy() const
Description
Return true if this is a FP type or a vector of FP.
Declared at: llvm/include/llvm/IR/Type.h:185
¶bool isFirstClassType() const
bool isFirstClassType() const
Description
Return true if the type is "first class", meaning it is a valid type for a Value.
Declared at: llvm/include/llvm/IR/Type.h:244
¶bool isFloatTy() const
bool isFloatTy() const
Description
Return true if this is 'float', a 32-bit IEEE fp type.
Declared at: llvm/include/llvm/IR/Type.h:147
¶bool isFloatingPointTy() const
bool isFloatingPointTy() const
Description
Return true if this is one of the six floating-point types
Declared at: llvm/include/llvm/IR/Type.h:162
¶bool isFunctionTy() const
bool isFunctionTy() const
Description
True if this is an instance of FunctionType.
Declared at: llvm/include/llvm/IR/Type.h:215
¶inline bool isFunctionVarArg() const
inline bool isFunctionVarArg() const
Declared at: llvm/include/llvm/IR/Type.h:355
¶bool isHalfTy() const
bool isHalfTy() const
Description
Return true if this is 'half', a 16-bit IEEE fp type.
Declared at: llvm/include/llvm/IR/Type.h:144
¶bool isIntOrIntVectorTy(
unsigned int BitWidth) const
bool isIntOrIntVectorTy(
unsigned int BitWidth) const
Description
Return true if this is an integer type or a vector of integer types of the given width.
Declared at: llvm/include/llvm/IR/Type.h:207
Parameters
- unsigned int BitWidth
¶bool isIntOrIntVectorTy() const
bool isIntOrIntVectorTy() const
Description
Return true if this is an integer type or a vector of integer types.
Declared at: llvm/include/llvm/IR/Type.h:203
¶bool isIntOrPtrTy() const
bool isIntOrPtrTy() const
Description
Return true if this is an integer type or a pointer type.
Declared at: llvm/include/llvm/IR/Type.h:212
¶bool isIntegerTy(unsigned int Bitwidth) const
bool isIntegerTy(unsigned int Bitwidth) const
Description
Return true if this is an IntegerType of the given width.
Declared at: llvm/include/llvm/IR/Type.h:200
Parameters
- unsigned int Bitwidth
¶bool isIntegerTy() const
bool isIntegerTy() const
Description
True if this is an instance of IntegerType.
Declared at: llvm/include/llvm/IR/Type.h:197
¶bool isLabelTy() const
bool isLabelTy() const
Description
Return true if this is 'label'.
Declared at: llvm/include/llvm/IR/Type.h:188
¶bool isMetadataTy() const
bool isMetadataTy() const
Description
Return true if this is 'metadata'.
Declared at: llvm/include/llvm/IR/Type.h:191
¶bool isPPC_FP128Ty() const
bool isPPC_FP128Ty() const
Description
Return true if this is powerpc long double.
Declared at: llvm/include/llvm/IR/Type.h:159
¶bool isPointerTy() const
bool isPointerTy() const
Description
True if this is an instance of PointerType.
Declared at: llvm/include/llvm/IR/Type.h:224
¶bool isPtrOrPtrVectorTy() const
bool isPtrOrPtrVectorTy() const
Description
Return true if this is a pointer type or a vector of pointer types.
Declared at: llvm/include/llvm/IR/Type.h:227
¶static bool isSequentialType(
llvm::Type::TypeID TyID)
static bool isSequentialType(
llvm::Type::TypeID TyID)
Declared at: llvm/include/llvm/IR/Type.h:113
Parameters
- llvm::Type::TypeID TyID
¶bool isSingleValueType() const
bool isSingleValueType() const
Description
Return true if the type is a valid type for a register in codegen. This includes all first-class types except struct and array types.
Declared at: llvm/include/llvm/IR/Type.h:250
¶bool isSized(SmallPtrSetImpl<llvm::Type*>*
Visited = nullptr) const
bool isSized(SmallPtrSetImpl<llvm::Type*>*
Visited = nullptr) const
Description
Return true if it makes sense to take the size of this type. To get the actual size for a particular target, it is reasonable to use the DataLayout subsystem to do this.
Declared at: llvm/include/llvm/IR/Type.h:265
Parameters
- SmallPtrSetImpl<llvm::Type*>* Visited = nullptr
¶bool isStructTy() const
bool isStructTy() const
Description
True if this is an instance of StructType.
Declared at: llvm/include/llvm/IR/Type.h:218
¶bool isTokenTy() const
bool isTokenTy() const
Description
Return true if this is 'token'.
Declared at: llvm/include/llvm/IR/Type.h:194
¶bool isVectorTy() const
bool isVectorTy() const
Description
True if this is an instance of VectorType.
Declared at: llvm/include/llvm/IR/Type.h:230
¶bool isVoidTy() const
bool isVoidTy() const
Description
Return true if this is 'void'.
Declared at: llvm/include/llvm/IR/Type.h:141
¶bool isX86_FP80Ty() const
bool isX86_FP80Ty() const
Description
Return true if this is x86 long double.
Declared at: llvm/include/llvm/IR/Type.h:153
¶bool isX86_MMXTy() const
bool isX86_MMXTy() const
Description
Return true if this is X86 MMX.
Declared at: llvm/include/llvm/IR/Type.h:182
¶void print(llvm::raw_ostream& O,
bool IsForDebug = false,
bool NoDetails = false) const
void print(llvm::raw_ostream& O,
bool IsForDebug = false,
bool NoDetails = false) const
Description
Print the current type. Omit the type details if \p NoDetails == true. E.g., let %st = type { i32, i16 } When \p NoDetails is true, we only print %st. Put differently, \p NoDetails prints the type as if inlined with the operands when printing an instruction.
Declared at: llvm/include/llvm/IR/Type.h:124
Parameters
- llvm::raw_ostream& O
- bool IsForDebug = false
- bool NoDetails = false
¶void setSubclassData(unsigned int val)
void setSubclassData(unsigned int val)
Declared at: llvm/include/llvm/IR/Type.h:97
Parameters
- unsigned int val
¶llvm::Type::subtype_iterator subtype_begin() const
llvm::Type::subtype_iterator subtype_begin() const
Declared at: llvm/include/llvm/IR/Type.h:318
¶llvm::Type::subtype_iterator subtype_end() const
llvm::Type::subtype_iterator subtype_end() const
Declared at: llvm/include/llvm/IR/Type.h:319
¶llvm::Type::subtype_reverse_iterator
subtype_rbegin() const
llvm::Type::subtype_reverse_iterator
subtype_rbegin() const
Declared at: llvm/include/llvm/IR/Type.h:326
¶llvm::Type::subtype_reverse_iterator
subtype_rend() const
llvm::Type::subtype_reverse_iterator
subtype_rend() const
Declared at: llvm/include/llvm/IR/Type.h:329
¶ArrayRef<llvm::Type*> subtypes() const
ArrayRef<llvm::Type*> subtypes() const
Declared at: llvm/include/llvm/IR/Type.h:320
¶~Type()
~Type()
Declared at: llvm/include/llvm/IR/Type.h:93