class IntegerType
Declaration
class IntegerType : public Type { /* full declaration omitted */ };
Description
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
Declared at: llvm/include/llvm/IR/DerivedTypes.h:40
Inherits from: Type
Member Variables
Inherited from Type:
- protected NumContainedTys = 0
- protected ContainedTys = nullptr
Method Overview
- protected IntegerType(llvm::LLVMContext & C, unsigned int NumBits)
- public static bool classof(const llvm::Type * T)
- public static llvm::IntegerType * get(llvm::LLVMContext & C, unsigned int NumBits)
- public uint64_t getBitMask() const
- public unsigned int getBitWidth() const
- public llvm::IntegerType * getExtendedType() const
- public llvm::APInt getMask() const
- public uint64_t getSignBit() const
- public bool isPowerOf2ByteWidth() const
Inherited from Type:
- public canLosslesslyBitCastTo
- public dump
- public getArrayElementType
- public getArrayNumElements
- public getContainedType
- public getContext
- public getDoublePtrTy
- public getDoubleTy
- public getExtendedType
- public getFP128PtrTy
- public getFP128Ty
- public getFPMantissaWidth
- public getFloatPtrTy
- public getFloatTy
- public getFltSemantics
- public getFunctionNumParams
- public getFunctionParamType
- public getHalfPtrTy
- public getHalfTy
- public getInt128Ty
- public getInt16PtrTy
- public getInt16Ty
- public getInt1PtrTy
- public getInt1Ty
- public getInt32PtrTy
- public getInt32Ty
- public getInt64PtrTy
- public getInt64Ty
- public getInt8PtrTy
- public getInt8Ty
- public getIntNPtrTy
- public getIntNTy
- public getIntegerBitWidth
- public getLabelTy
- public getMetadataTy
- public getNumContainedTypes
- public getPPC_FP128PtrTy
- public getPPC_FP128Ty
- public getPointerAddressSpace
- public getPointerElementType
- public getPointerTo
- public getPrimitiveSizeInBits
- public getPrimitiveType
- public getScalarSizeInBits
- public getScalarTy
- public getScalarType
- public getSequentialElementType
- public getStructElementType
- public getStructName
- public getStructNumElements
- protected getSubclassData
- public getTokenTy
- public getTypeID
- public getVectorElementCount
- public getVectorElementType
- public getVectorIsScalable
- public getVectorNumElements
- public getVoidTy
- public getWithNewBitWidth
- public getX86_FP80PtrTy
- public getX86_FP80Ty
- public getX86_MMXPtrTy
- public getX86_MMXTy
- public isAggregateType
- public isArrayTy
- public isDoubleTy
- public isEmptyTy
- public isFP128Ty
- public isFPOrFPVectorTy
- public isFirstClassType
- public isFloatTy
- public isFloatingPointTy
- public isFunctionTy
- public isFunctionVarArg
- public isHalfTy
- public isIntOrIntVectorTy
- public isIntOrIntVectorTy
- public isIntOrPtrTy
- public isIntegerTy
- public isIntegerTy
- public isLabelTy
- public isMetadataTy
- public isPPC_FP128Ty
- public isPointerTy
- public isPtrOrPtrVectorTy
- protected isSequentialType
- public isSingleValueType
- public isSized
- public isStructTy
- public isTokenTy
- public isVectorTy
- public isVoidTy
- public isX86_FP80Ty
- public isX86_MMXTy
- public print
- protected setSubclassData
- public subtype_begin
- public subtype_end
- public subtype_rbegin
- public subtype_rend
- public subtypes
Methods
¶IntegerType(llvm::LLVMContext& C,
unsigned int NumBits)
IntegerType(llvm::LLVMContext& C,
unsigned int NumBits)
Declared at: llvm/include/llvm/IR/DerivedTypes.h:44
Parameters
- llvm::LLVMContext& C
- unsigned int NumBits
¶static bool classof(const llvm::Type* T)
static bool classof(const llvm::Type* T)
Description
Methods for support type inquiry through isa, cast, and dyn_cast.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:97
Parameters
- const llvm::Type* T
¶static llvm::IntegerType* get(
llvm::LLVMContext& C,
unsigned int NumBits)
static llvm::IntegerType* get(
llvm::LLVMContext& C,
unsigned int NumBits)
Description
This static method is the primary way of constructing an IntegerType. If an IntegerType with the same NumBits value was previously instantiated, that instance will be returned. Otherwise a new one will be created. Only one instance with a given NumBits value is ever created. Get or create an IntegerType instance.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:63
Parameters
- llvm::LLVMContext& C
- unsigned int NumBits
¶uint64_t getBitMask() const
uint64_t getBitMask() const
Description
Return a bitmask with ones set for all of the bits that can be set by an unsigned version of this type. This is 0xFF for i8, 0xFFFF for i16, etc.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:75
¶unsigned int getBitWidth() const
unsigned int getBitWidth() const
Description
Get the number of bits in this IntegerType
Declared at: llvm/include/llvm/IR/DerivedTypes.h:71
¶llvm::IntegerType* getExtendedType() const
llvm::IntegerType* getExtendedType() const
Description
Returns type twice as wide the input type.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:66
¶llvm::APInt getMask() const
llvm::APInt getMask() const
Description
For example, this is 0xFF for an 8 bit integer, 0xFFFF for i16, etc.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:88
Returns
a bit mask with ones set for all the bits of this type. Get a bit mask for this type.
¶uint64_t getSignBit() const
uint64_t getSignBit() const
Description
Return a uint64_t with just the most significant bit set (the sign bit, if the value is treated as a signed number).
Declared at: llvm/include/llvm/IR/DerivedTypes.h:81
¶bool isPowerOf2ByteWidth() const
bool isPowerOf2ByteWidth() const
Description
This method determines if the width of this IntegerType is a power-of-2 in terms of 8 bit bytes.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:94
Returns
true if this is a power-of-2 byte width. Is this a power-of-2 byte-width IntegerType ?