class PointerType
Declaration
class PointerType : public Type { /* full declaration omitted */ };
Description
Class to represent pointers.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:632
Inherits from: Type
Member Variables
- private llvm::Type* PointeeTy
Inherited from Type:
- protected NumContainedTys = 0
- protected ContainedTys = nullptr
Method Overview
- private PointerType(llvm::Type * ElType, unsigned int AddrSpace)
- private PointerType(llvm::LLVMContext & C, unsigned int AddrSpace)
- public PointerType(const llvm::PointerType &)
- public static bool classof(const llvm::Type * T)
- public static llvm::PointerType * get(llvm::Type * ElementType, unsigned int AddressSpace)
- public static llvm::PointerType * get(llvm::LLVMContext & C, unsigned int AddressSpace)
- public inline unsigned int getAddressSpace() const
- public static llvm::PointerType * getUnqual(llvm::Type * ElementType)
- public static llvm::PointerType * getUnqual(llvm::LLVMContext & C)
- public static llvm::PointerType * getWithSamePointeeType(llvm::PointerType * PT, unsigned int AddressSpace)
- public bool hasSameElementTypeAs(llvm::PointerType * Other)
- public static bool isLoadableOrStorableType(llvm::Type * ElemTy)
- public bool isOpaque() const
- public bool isOpaqueOrPointeeTypeMatches(llvm::Type * Ty)
- public static bool isValidElementType(llvm::Type * ElemTy)
Inherited from Type:
- public canLosslesslyBitCastTo
- public dump
- public getArrayElementType
- public getArrayNumElements
- public getBFloatPtrTy
- public getBFloatTy
- public getContainedType
- public getContext
- public getDoublePtrTy
- public getDoubleTy
- public getExtendedType
- public getFP128PtrTy
- public getFP128Ty
- public getFPMantissaWidth
- public getFloatPtrTy
- public getFloatTy
- public getFloatingPointTy
- 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 getNonOpaquePointerElementType
- 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 getStructElementType
- public getStructName
- public getStructNumElements
- protected getSubclassData
- public getTokenTy
- public getTypeID
- public getVoidTy
- public getWithNewBitWidth
- public getWithNewType
- public getX86_AMXPtrTy
- public getX86_AMXTy
- public getX86_FP80PtrTy
- public getX86_FP80Ty
- public getX86_MMXPtrTy
- public getX86_MMXTy
- public is16bitFPTy
- public isAggregateType
- public isArrayTy
- public isBFloatTy
- public isDoubleTy
- public isEmptyTy
- public isFP128Ty
- public isFPOrFPVectorTy
- public isFirstClassType
- public isFloatTy
- public isFloatingPointTy
- public isFunctionTy
- public isFunctionVarArg
- public isHalfTy
- public isIEEE
- public isIntOrIntVectorTy
- public isIntOrIntVectorTy
- public isIntOrPtrTy
- public isIntegerTy
- public isIntegerTy
- public isLabelTy
- public isMetadataTy
- public isOpaquePointerTy
- public isPPC_FP128Ty
- public isPointerTy
- public isPtrOrPtrVectorTy
- public isSingleValueType
- public isSized
- public isStructTy
- public isTokenTy
- public isVectorTy
- public isVoidTy
- public isX86_AMXTy
- 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
¶PointerType(llvm::Type* ElType,
unsigned int AddrSpace)
PointerType(llvm::Type* ElType,
unsigned int AddrSpace)
Declared at: llvm/include/llvm/IR/DerivedTypes.h:633
Parameters
- llvm::Type* ElType
- unsigned int AddrSpace
¶PointerType(llvm::LLVMContext& C,
unsigned int AddrSpace)
PointerType(llvm::LLVMContext& C,
unsigned int AddrSpace)
Declared at: llvm/include/llvm/IR/DerivedTypes.h:634
Parameters
- llvm::LLVMContext& C
- unsigned int AddrSpace
¶PointerType(const llvm::PointerType&)
PointerType(const llvm::PointerType&)
Declared at: llvm/include/llvm/IR/DerivedTypes.h:639
Parameters
- const llvm::PointerType&
¶static bool classof(const llvm::Type* T)
static bool classof(const llvm::Type* T)
Description
Implement support type inquiry through isa, cast, and dyn_cast.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:701
Parameters
- const llvm::Type* T
¶static llvm::PointerType* get(
llvm::Type* ElementType,
unsigned int AddressSpace)
static llvm::PointerType* get(
llvm::Type* ElementType,
unsigned int AddressSpace)
Description
This constructs a pointer to an object of the specified type in a numbered address space.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:644
Parameters
- llvm::Type* ElementType
- unsigned int AddressSpace
¶static llvm::PointerType* get(
llvm::LLVMContext& C,
unsigned int AddressSpace)
static llvm::PointerType* get(
llvm::LLVMContext& C,
unsigned int AddressSpace)
Description
This constructs an opaque pointer to an object in a numbered address space.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:647
Parameters
- llvm::LLVMContext& C
- unsigned int AddressSpace
¶inline unsigned int getAddressSpace() const
inline unsigned int getAddressSpace() const
Description
Return the address space of the Pointer type.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:682
¶static llvm::PointerType* getUnqual(
llvm::Type* ElementType)
static llvm::PointerType* getUnqual(
llvm::Type* ElementType)
Description
This constructs a pointer to an object of the specified type in the default address space (address space zero).
Declared at: llvm/include/llvm/IR/DerivedTypes.h:651
Parameters
- llvm::Type* ElementType
¶static llvm::PointerType* getUnqual(
llvm::LLVMContext& C)
static llvm::PointerType* getUnqual(
llvm::LLVMContext& C)
Description
This constructs an opaque pointer to an object in the default address space (address space zero).
Declared at: llvm/include/llvm/IR/DerivedTypes.h:657
Parameters
¶static llvm::PointerType* getWithSamePointeeType(
llvm::PointerType* PT,
unsigned int AddressSpace)
static llvm::PointerType* getWithSamePointeeType(
llvm::PointerType* PT,
unsigned int AddressSpace)
Description
This constructs a pointer type with the same pointee type as input PointerType (or opaque pointer if the input PointerType is opaque) and the given address space. This is only useful during the opaque pointer transition. TODO: remove after opaque pointer transition is complete.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:666
Parameters
- llvm::PointerType* PT
- unsigned int AddressSpace
¶bool hasSameElementTypeAs(
llvm::PointerType* Other)
bool hasSameElementTypeAs(
llvm::PointerType* Other)
Description
Return true if both pointer types have the same element type. Two opaque pointers are considered to have the same element type, while an opaque and a non-opaque pointer have different element types. TODO: Remove after opaque pointer transition is complete.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:696
Parameters
- llvm::PointerType* Other
¶static bool isLoadableOrStorableType(
llvm::Type* ElemTy)
static bool isLoadableOrStorableType(
llvm::Type* ElemTy)
Description
Return true if we can load or store from a pointer to this type.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:679
Parameters
- llvm::Type* ElemTy
¶bool isOpaque() const
bool isOpaque() const
Declared at: llvm/include/llvm/IR/DerivedTypes.h:673
¶bool isOpaqueOrPointeeTypeMatches(llvm::Type* Ty)
bool isOpaqueOrPointeeTypeMatches(llvm::Type* Ty)
Description
Return true if either this is an opaque pointer type or if this pointee type matches Ty. Primarily used for checking if an instruction's pointer operands are valid types. Will be useless after non-opaque pointers are removed.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:688
Parameters
- llvm::Type* Ty
¶static bool isValidElementType(llvm::Type* ElemTy)
static bool isValidElementType(llvm::Type* ElemTy)
Description
Return true if the specified type is valid as a element type.
Declared at: llvm/include/llvm/IR/DerivedTypes.h:676
Parameters
- llvm::Type* ElemTy