clang
3.9.0
|
An aligned address. More...
#include <Address.h>
Public Member Functions | |
Address (llvm::Value *pointer, CharUnits alignment) | |
bool | isValid () const |
llvm::Value * | getPointer () const |
llvm::PointerType * | getType () const |
Return the type of the pointer value. More... | |
llvm::Type * | getElementType () const |
Return the type of the values stored in this address. More... | |
unsigned | getAddressSpace () const |
Return the address space that this address resides in. More... | |
llvm::StringRef | getName () const |
Return the IR name of the pointer value. More... | |
CharUnits | getAlignment () const |
Return the alignment of this pointer. More... | |
Static Public Member Functions | |
static Address | invalid () |
|
inline |
Definition at line 29 of file Address.h.
References clang::CharUnits::isZero().
Referenced by invalid().
|
inline |
Return the address space that this address resides in.
Definition at line 57 of file Address.h.
References getType().
Referenced by clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), and clang::CodeGen::ConstantAddress::getElementBitCast().
|
inline |
Return the alignment of this pointer.
Definition at line 67 of file Address.h.
References isValid().
Referenced by ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::ConstantAddress::castImpl(), clang::CodeGen::CGBuilderTy::CreateBitCast(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateLoad(), createLoadInstBefore(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CGBuilderTy::CreateMemMove(), clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateStore(), createStoreInstBefore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::CodeGenFunction::CXXDefaultInitExprScope::CXXDefaultInitExprScope(), EmitArrayDelete(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), emitArraySubscriptGEP(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXDeleteExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberDataPointerAddress(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), emitMergePHI(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), clang::CodeGen::emitThreadPrivateVarDefinition(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), clang::CodeGen::AggValueSlot::forAddr(), forConstantArrayExpansion(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::getAddrOfThreadPrivate(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::ConstantAddress::getBitCast(), clang::CodeGen::CodeGenFunction::InitTempAlloca(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeGlobalReg(), clang::CodeGen::LValue::MakeVectorElt(), clang::CodeGen::CodeGenFunction::recoverAddrOfEscapedLocal(), clang::CodeGen::DominatingValue< Address >::save(), clang::CodeGen::setActiveFlag(), clang::CodeGen::LValue::setAddress(), and clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional().
|
inline |
Return the type of the values stored in this address.
When IR pointer types lose their element type, we should simply store it in Address instead for the convenience of writing code.
Definition at line 52 of file Address.h.
References getType().
Referenced by castToBase(), CreateCoercedLoad(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), EmitAggMemberInitializer(), emitARCLoadOperation(), emitARCStoreOperation(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrongCall(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicCompareExchange(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitCXXDeleteExpr(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitInitializerForField(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), EmitOMPAggregateInit(), emitOMPArraySectionBase(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), emitOMPAtomicRMW(), clang::CodeGen::CodeGenFunction::EmitScalarInit(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), emitVoidPtrDirectVAArg(), emitWriteback(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::CodeGen::getAddrOfThreadPrivate(), getNullForVariable(), and tryEmitARCCopyWeakInit().
|
inline |
Return the IR name of the pointer value.
Definition at line 62 of file Address.h.
References getPointer().
Referenced by clang::CodeGen::CodeGenFunction::emitAddrOfImagComponent(), clang::CodeGen::CodeGenFunction::emitAddrOfRealComponent(), clang::CodeGen::CodeGenFunction::EmitCall(), and clang::CodeGen::CodeGenFunction::recoverAddrOfEscapedLocal().
|
inline |
Definition at line 38 of file Address.h.
References isValid().
Referenced by addIfPresent(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::ConstantAddress::castImpl(), castToBase(), castValueFromUintptr(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateLoad(), createLoadInstBefore(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CGBuilderTy::CreateMemMove(), clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateStore(), createStoreInstBefore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::CodeGenFunction::CXXDefaultInitExprScope::CXXDefaultInitExprScope(), clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAnyExprToExn(), emitARCCopyOperation(), clang::CodeGen::CodeGenFunction::EmitARCDestroyWeak(), emitARCLoadOperation(), emitARCStoreOperation(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrongCall(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), EmitArrayDelete(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), emitArraySubscriptGEP(), emitAtomicCmpXchg(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::emitByrefStructureInit(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCheckValue(), clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXDeleteExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::emitDoacrossOrdered(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitFieldAnnotations(), clang::CodeGen::emitForNext(), emitForStaticInitCall(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitInheritedCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), emitMergePHI(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), EmitObjectDelete(), emitOffloadingArrays(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), clang::CodeGen::CodeGenFunction::EmitOMPCopyinClause(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), emitStructGetterCall(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::emitTaskCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), clang::CodeGen::emitThreadPrivateVarInit(), EmitTypeidFromVTable(), clang::CodeGen::emitUpdateLocation(), emitVoidPtrDirectVAArg(), emitWriteback(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), enterBlockScope(), clang::CodeGen::CodeGenFunction::enterByrefCleanup(), EnterNewDeleteCleanup(), findDominatingStoreToReturnValue(), clang::CodeGen::AggValueSlot::forAddr(), forConstantArrayExpansion(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDerivedClass(), clang::CodeGen::getAddrOfThreadPrivate(), clang::CodeGen::RValue::getAggregate(), getName(), clang::CodeGen::ConstantAddress::getPointer(), getType(), InitCatchParam(), clang::CodeGen::CodeGenFunction::InitTempAlloca(), clang::CodeGen::ConstantAddress::isaImpl(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeGlobalReg(), clang::CodeGen::LValue::MakeVectorElt(), clang::CodeGen::DominatingValue< Address >::needsSaving(), performTypeAdjustment(), pushTemporaryCleanup(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), clang::CodeGen::CodeGenFunction::recoverAddrOfEscapedLocal(), clang::CodeGen::DominatingLLVMValue::save(), clang::CodeGen::DominatingValue< Address >::save(), clang::CodeGen::setActiveFlag(), clang::CodeGen::LValue::setAddress(), clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional(), clang::CodeGen::CodeGenFunction::StartFunction(), and tryRemoveRetainOfSelf().
|
inline |
Return the type of the pointer value.
Definition at line 44 of file Address.h.
References getPointer().
Referenced by CreateCoercedLoad(), CreateCoercedStore(), emitARCCopyOperation(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), emitMergePHI(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), emitPrivatesInit(), emitPseudoObjectExpr(), emitTaskPrivateMappingFunction(), clang::CodeGen::emitThreadPrivateVarDefinition(), clang::CodeGen::CodeGenFunction::EmitVTableAssumptionLoad(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), getAddressSpace(), getElementType(), performTypeAdjustment(), clang::CodeGen::CodeGenFunction::recoverAddrOfEscapedLocal(), and serializeClassHierarchy().
|
inlinestatic |
Definition at line 35 of file Address.h.
References Address().
Referenced by clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), castToBase(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitInitializerForField(), clang::CodeGen::ABIInfo::EmitMSVAArg(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCIsaExpr(), EmitOMPAggregateInit(), clang::CodeGen::CodeGenFunction::EmitOMPCopyinClause(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), emitVoidPtrDirectVAArg(), clang::CodeGen::AggValueSlot::ignored(), clang::CodeGen::CGCXXABI::InitializeArrayCookie(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), clang::CodeGen::CodeGenFunction::PopCleanupBlock(), and clang::CodeGen::CodeGenFunction::StartFunction().
|
inline |
Definition at line 36 of file Address.h.
Referenced by addIfPresent(), castToBase(), CheckAggExprForMemSetUse(), clang::CodeGen::CodeGenFunction::EmitAggExpr(), EmitAggMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), clang::CodeGen::CodeGenFunction::EmitCall(), EmitCleanup(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), clang::CodeGen::emitUpdateLocation(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc(), getAlignment(), getPointer(), clang::CodeGen::ReturnValueSlot::isNull(), clang::CodeGen::CodeGenFunction::PopCleanupBlock(), and SetupCleanupBlockActivation().