LLVM API Documentation
#include <DerivedTypes.h>
Public Member Functions | |
unsigned | getAddressSpace () const |
Return the address space of the Pointer type. | |
Static Public Member Functions | |
static PointerType * | get (Type *ElementType, unsigned AddressSpace) |
static PointerType * | getUnqual (Type *ElementType) |
static bool | isValidElementType (Type *ElemTy) |
static bool | classof (const Type *T) |
Implement support type inquiry through isa, cast, and dyn_cast. |
PointerType - Class to represent pointers.
Definition at line 442 of file DerivedTypes.h.
static bool llvm::PointerType::classof | ( | const Type * | T | ) | [inline, static] |
Implement support type inquiry through isa, cast, and dyn_cast.
Reimplemented from llvm::SequentialType.
Definition at line 465 of file DerivedTypes.h.
References llvm::Type::getTypeID(), and llvm::Type::PointerTyID.
PointerType * PointerType::get | ( | Type * | ElementType, |
unsigned | AddressSpace | ||
) | [static] |
PointerType::get - This constructs a pointer to an object of the specified type in a numbered address space.
Definition at line 736 of file Type.cpp.
References llvm::LLVMContextImpl::ASPointerTypes, llvm::Type::getContext(), isValidElementType(), llvm::LLVMContext::pImpl, llvm::LLVMContextImpl::PointerTypes, and llvm::LLVMContextImpl::TypeAllocator.
Referenced by AnalyzeLoadFromClobberingMemInst(), ConstantFoldGetElementPtrImpl(), convertMemSetToLoop(), CreatePrologue(), DecodeFixedType(), getAccessType(), llvm::SelectionDAG::getEVTAlignment(), getFoldedAlignOf(), getFoldedSizeOf(), llvm::GetElementPtrInst::getGEPReturnType(), GetHeapSROAValue(), GetLoadValueForLoad(), GetMemInstValueForLoad(), llvm::Module::getOrInsertGlobal(), llvm::Type::getPointerTo(), InstCombineStoreToCast(), LLVMPointerType(), llvm::R600TargetLowering::LowerFormalArguments(), llvm::NVPTXTargetLowering::LowerFormalArguments(), PerformHeapAllocSRoA(), SimplifyGEPInst(), and llvm::InstCombiner::visitAddrSpaceCast().
unsigned llvm::PointerType::getAddressSpace | ( | ) | const [inline] |
Return the address space of the Pointer type.
Definition at line 462 of file DerivedTypes.h.
References llvm::Type::getSubclassData().
Referenced by canDemoteGlobalVar(), llvm::CastInst::castIsValid(), ConstantFoldGetElementPtrImpl(), llvm::GlobalAlias::create(), FoldReinterpretLoadFromConstPtr(), llvm::GlobalAddressSDNode::getAddressSpace(), llvm::ConstantExpr::getAddrSpaceCast(), llvm::SelectionDAG::getGlobalAddress(), GetHeapSROAValue(), getNaturalGEPWithOffset(), INITIALIZE_PASS(), InstCombineLoadCast(), InstCombineStoreToCast(), llvm::isAllocaPromotable(), isTypeCongruent(), nvptx::LowerConstant(), llvm::TypePrinting::print(), llvm::AssemblyWriter::printGlobal(), SimplifyGEPInst(), SRAGlobal(), StripPtrCastKeepAS(), TryToShrinkGlobalToBoolean(), llvm::InstCombiner::visitAddrSpaceCast(), llvm::InstCombiner::visitGetElementPtrInst(), and WriteTypeTable().
static PointerType* llvm::PointerType::getUnqual | ( | Type * | ElementType | ) | [inline, static] |
PointerType::getUnqual - This constructs a pointer to an object of the specified type in the generic address space (address space zero).
Definition at line 453 of file DerivedTypes.h.
References llvm::IntegerType::get().
Referenced by appendToGlobalArray(), createMalloc(), llvm::InlineAsm::get(), llvm::TypeBuilder< T *, cross >::get(), llvm::ScalarEvolution::getElementSize(), getMemCmpLoad(), llvm::ConstantExpr::getOffsetOf(), llvm::ScalarEvolution::getOffsetOfExpr(), llvm::Module::getOrInsertFunction(), llvm::ConstantExpr::getSizeOf(), llvm::ScalarEvolution::getSizeOfExpr(), llvm::TargetLowering::LowerCallTo(), llvm::SparcTargetLowering::LowerF128_LibCallArg(), llvm::SparcTargetLowering::LowerF128Op(), llvm::UpgradeIntrinsicCall(), and llvm::InstCombiner::visitCallInst().
bool PointerType::isValidElementType | ( | Type * | ElemTy | ) | [static] |
isValidElementType - Return true if the specified type is valid as a element type.
Definition at line 766 of file Type.cpp.
References llvm::Type::isLabelTy(), llvm::Type::isMetadataTy(), and llvm::Type::isVoidTy().
Referenced by get().