clang 22.0.0git
clang::GlobalDecl Class Reference

GlobalDecl - represents a global declaration. More...

#include "clang/AST/GlobalDecl.h"

Public Member Functions

 GlobalDecl ()=default
 GlobalDecl (const VarDecl *D)
 GlobalDecl (const FunctionDecl *D, unsigned MVIndex=0)
 GlobalDecl (const FunctionDecl *D, KernelReferenceKind Kind)
 GlobalDecl (const NamedDecl *D)
 GlobalDecl (const BlockDecl *D)
 GlobalDecl (const CapturedDecl *D)
 GlobalDecl (const ObjCMethodDecl *D)
 GlobalDecl (const OMPDeclareReductionDecl *D)
 GlobalDecl (const OMPDeclareMapperDecl *D)
 GlobalDecl (const OpenACCRoutineDecl *D)
 GlobalDecl (const OpenACCDeclareDecl *D)
 GlobalDecl (const CXXConstructorDecl *D, CXXCtorType Type)
 GlobalDecl (const CXXDestructorDecl *D, CXXDtorType Type)
 GlobalDecl (const VarDecl *D, DynamicInitKind StubKind)
GlobalDecl getCanonicalDecl () const
const DeclgetDecl () const
CXXCtorType getCtorType () const
CXXDtorType getDtorType () const
DynamicInitKind getDynamicInitKind () const
unsigned getMultiVersionIndex () const
KernelReferenceKind getKernelReferenceKind () const
bool operator!= (const GlobalDecl &Other) const
void * getAsOpaquePtr () const
 operator bool () const
GlobalDecl getWithDecl (const Decl *D)
GlobalDecl getWithCtorType (CXXCtorType Type)
GlobalDecl getWithDtorType (CXXDtorType Type)
GlobalDecl getWithMultiVersionIndex (unsigned Index)
GlobalDecl getWithKernelReferenceKind (KernelReferenceKind Kind)

Static Public Member Functions

static GlobalDecl getFromOpaquePtr (void *P)
static KernelReferenceKind getDefaultKernelReference (const FunctionDecl *D)

Friends

bool operator== (const GlobalDecl &LHS, const GlobalDecl &RHS)

Detailed Description

GlobalDecl - represents a global declaration.

This can either be a CXXConstructorDecl and the constructor type (Base, Complete). a CXXDestructorDecl and the destructor type (Base, Complete), a FunctionDecl and the kernel reference type (Kernel, Stub), or a VarDecl, a FunctionDecl or a BlockDecl.

When a new type of GlobalDecl is added, the following places should be updated to convert a Decl* to a GlobalDecl: PredefinedExpr::ComputeName() in lib/AST/Expr.cpp. getParentOfLocalEntity() in lib/AST/ItaniumMangle.cpp ASTNameGenerator::Implementation::writeFuncOrVarName in lib/AST/Mangle.cpp

Definition at line 57 of file GlobalDecl.h.

Constructor & Destructor Documentation

◆ GlobalDecl() [1/15]

◆ GlobalDecl() [2/15]

clang::GlobalDecl::GlobalDecl ( const VarDecl * D)
inline

Definition at line 71 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [3/15]

clang::GlobalDecl::GlobalDecl ( const FunctionDecl * D,
unsigned MVIndex = 0 )
inline

Definition at line 72 of file GlobalDecl.h.

References clang::FunctionDecl::isReferenceableKernel().

◆ GlobalDecl() [4/15]

clang::GlobalDecl::GlobalDecl ( const FunctionDecl * D,
KernelReferenceKind Kind )
inline

Definition at line 80 of file GlobalDecl.h.

References clang::FunctionDecl::isReferenceableKernel().

◆ GlobalDecl() [5/15]

clang::GlobalDecl::GlobalDecl ( const NamedDecl * D)
inline

Definition at line 84 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [6/15]

clang::GlobalDecl::GlobalDecl ( const BlockDecl * D)
inline

Definition at line 85 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [7/15]

clang::GlobalDecl::GlobalDecl ( const CapturedDecl * D)
inline

Definition at line 86 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [8/15]

clang::GlobalDecl::GlobalDecl ( const ObjCMethodDecl * D)
inline

Definition at line 87 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [9/15]

clang::GlobalDecl::GlobalDecl ( const OMPDeclareReductionDecl * D)
inline

Definition at line 88 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [10/15]

clang::GlobalDecl::GlobalDecl ( const OMPDeclareMapperDecl * D)
inline

Definition at line 89 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [11/15]

clang::GlobalDecl::GlobalDecl ( const OpenACCRoutineDecl * D)
inline

Definition at line 90 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [12/15]

clang::GlobalDecl::GlobalDecl ( const OpenACCDeclareDecl * D)
inline

Definition at line 91 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [13/15]

clang::GlobalDecl::GlobalDecl ( const CXXConstructorDecl * D,
CXXCtorType Type )
inline

Definition at line 92 of file GlobalDecl.h.

◆ GlobalDecl() [14/15]

clang::GlobalDecl::GlobalDecl ( const CXXDestructorDecl * D,
CXXDtorType Type )
inline

Definition at line 93 of file GlobalDecl.h.

◆ GlobalDecl() [15/15]

clang::GlobalDecl::GlobalDecl ( const VarDecl * D,
DynamicInitKind StubKind )
inline

Definition at line 94 of file GlobalDecl.h.

Member Function Documentation

◆ getAsOpaquePtr()

void * clang::GlobalDecl::getAsOpaquePtr ( ) const
inline

◆ getCanonicalDecl()

◆ getCtorType()

◆ getDecl()

const Decl * clang::GlobalDecl::getDecl ( ) const
inline

Definition at line 106 of file GlobalDecl.h.

Referenced by clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), clang::CIRGen::CIRGenTypes::arrangeGlobalDeclaration(), clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), asTemplateName(), clang::CodeGen::CodeGenFunction::BuildFunctionArgList(), clang::CIRGen::CIRGenFunction::buildFunctionArgList(), clang::CIRGen::CIRGenCXXABI::buildThisParam(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::CodeGen::CodeGenModule::codegenCXXStructor(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CIRGen::CIRGenModule::constructAttributeList(), clang::CIRGen::CIRGenModule::emitAliasForGlobal(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), EmitDirectCallee(), clang::CodeGen::CGDebugInfo::EmitFunctionDecl(), EmitFunctionDeclLValue(), emitFunctionDeclLValue(), clang::CodeGen::CGDebugInfo::emitFunctionStart(), clang::CodeGen::CodeGenModule::EmitGlobal(), clang::CIRGen::CIRGenModule::emitGlobal(), clang::CodeGen::CGDebugInfo::EmitGlobalAlias(), EmitGlobalDeclMetadata(), clang::CIRGen::CIRGenModule::emitGlobalDefinition(), clang::CIRGen::CIRGenModule::emitGlobalFunctionDefinition(), clang::CodeGen::CGDebugInfo::EmitInlineFunctionStart(), clang::CodeGen::CodeGenFunction::EmitLambdaInAllocaImplFn(), emitLLDBAsmLabel(), clang::CodeGen::CGOpenMPRuntime::emitTargetFunctions(), clang::CodeGen::CGOpenMPRuntime::emitTargetGlobal(), clang::CodeGen::CGOpenMPRuntime::emitTargetGlobalVariable(), clang::CodeGen::CodeGenVTables::EmitThunks(), clang::CIRGen::CIRGenVTables::emitThunks(), clang::ItaniumVTableContext::findOriginalMethod(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::CIRGen::CIRGenFunction::generateCode(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::CodeGen::EHPersonality::get(), clang::CIRGen::CIRGenModule::getAddrAndTypeOfCXXStructor(), clang::CodeGen::CodeGenModule::getAddrAndTypeOfCXXStructor(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CIRGen::CIRGenModule::getAddrOfFunction(), clang::CodeGen::CodeGenModule::GetAddrOfGlobal(), clang::CIRGen::CIRGenModule::getAddrOfGlobal(), clang::CodeGen::CodeGenModule::getBlockMangledName(), getCtorType(), getDtorType(), getDynamicInitKind(), clang::ASTContext::getFunctionFeatureMap(), clang::CIRGen::CIRGenModule::getFunctionLinkage(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), clang::CodeGen::CodeGenModule::getFunctionPointer(), clang::CodeGen::CodeGenTypes::GetFunctionTypeForVTable(), clang::CIRGen::CIRGenTypes::getFunctionTypeForVTable(), getKernelReferenceKind(), clang::CIRGen::CIRGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getMangledName(), clang::MicrosoftVTableContext::getMethodVFTableLocation(), clang::ItaniumVTableContext::getMethodVTableIndex(), getMultiVersionIndex(), getMultiversionLinkage(), clang::CIRGen::CIRGenModule::getOrCreateCIRFunction(), clang::CodeGen::CodeGenModule::GetOrCreateLLVMGlobal(), clang::CIRGen::CIRGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenModule::getRawFunctionPointer(), clang::CodeGen::CGCXXABI::getThisArgumentTypeForMethod(), clang::MicrosoftVTableContext::getThunkInfo(), clang::VTableContextBase::getThunkInfo(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), clang::CIRGen::CIRGenFunction::getVTTParameter(), getWithCtorType(), getWithDtorType(), getWithKernelReferenceKind(), getWithMultiVersionIndex(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), isDeletingDtor(), isTemplate(), isTemplate(), isUniqueInternalLinkageDecl(), clang::MangleContext::mangleName(), clang::CodeGen::CGOpenMPRuntime::markAsGlobalTarget(), clang::CodeGen::CodeGenModule::SetCommonAttributes(), clang::CIRGen::CIRGenModule::setCommonAttributes(), clang::CodeGen::CodeGenModule::setDLLImportDLLExport(), clang::CIRGen::CIRGenModule::setFunctionAttributes(), clang::CodeGen::CodeGenModule::setGVProperties(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CIRGen::CIRGenFunction::startFunction(), clang::CodeGen::CodeGenFunction::StartThunk(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), and clang::ASTContext::useAbbreviatedThunkName().

◆ getDefaultKernelReference()

KernelReferenceKind clang::GlobalDecl::getDefaultKernelReference ( const FunctionDecl * D)
inlinestatic

◆ getDtorType()

◆ getDynamicInitKind()

DynamicInitKind clang::GlobalDecl::getDynamicInitKind ( ) const
inline

Definition at line 118 of file GlobalDecl.h.

References clang::cast(), getDecl(), and clang::isa().

Referenced by clang::CodeGen::CGDebugInfo::emitFunctionStart().

◆ getFromOpaquePtr()

GlobalDecl clang::GlobalDecl::getFromOpaquePtr ( void * P)
inlinestatic

Definition at line 160 of file GlobalDecl.h.

References GlobalDecl().

Referenced by llvm::DenseMapInfo< clang::GlobalDecl >::getTombstoneKey().

◆ getKernelReferenceKind()

◆ getMultiVersionIndex()

unsigned clang::GlobalDecl::getMultiVersionIndex ( ) const
inline

◆ getWithCtorType()

GlobalDecl clang::GlobalDecl::getWithCtorType ( CXXCtorType Type)
inline

Definition at line 178 of file GlobalDecl.h.

References getDecl(), GlobalDecl(), clang::isa(), and clang::Result.

◆ getWithDecl()

GlobalDecl clang::GlobalDecl::getWithDecl ( const Decl * D)
inline

◆ getWithDtorType()

GlobalDecl clang::GlobalDecl::getWithDtorType ( CXXDtorType Type)
inline

◆ getWithKernelReferenceKind()

GlobalDecl clang::GlobalDecl::getWithKernelReferenceKind ( KernelReferenceKind Kind)
inline

◆ getWithMultiVersionIndex()

GlobalDecl clang::GlobalDecl::getWithMultiVersionIndex ( unsigned Index)
inline

Definition at line 192 of file GlobalDecl.h.

References clang::cast(), getDecl(), GlobalDecl(), hasAttr(), clang::isa(), and clang::Result.

◆ operator bool()

clang::GlobalDecl::operator bool ( ) const
inlineexplicit

Definition at line 158 of file GlobalDecl.h.

References getAsOpaquePtr().

◆ operator!=()

bool clang::GlobalDecl::operator!= ( const GlobalDecl & Other) const
inline

Definition at line 152 of file GlobalDecl.h.

References GlobalDecl(), and clang::Other.

◆ operator==

bool operator== ( const GlobalDecl & LHS,
const GlobalDecl & RHS )
friend

Definition at line 147 of file GlobalDecl.h.

References GlobalDecl().


The documentation for this class was generated from the following file: