clang 24.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 CLANG_ABI 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 60 of file GlobalDecl.h.

Constructor & Destructor Documentation

◆ GlobalDecl() [1/15]

◆ GlobalDecl() [2/15]

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

Definition at line 80 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [3/15]

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

Definition at line 81 of file GlobalDecl.h.

References clang::FunctionDecl::isReferenceableKernel().

◆ GlobalDecl() [4/15]

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

Definition at line 89 of file GlobalDecl.h.

References clang::FunctionDecl::isReferenceableKernel().

◆ GlobalDecl() [5/15]

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

Definition at line 93 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [6/15]

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

Definition at line 94 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [7/15]

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

Definition at line 95 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [8/15]

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

Definition at line 96 of file GlobalDecl.h.

References clang::Init.

◆ GlobalDecl() [9/15]

GlobalDecl::GlobalDecl ( const OMPDeclareReductionDecl * D)

Definition at line 24 of file GlobalDecl.cpp.

References clang::Init.

◆ GlobalDecl() [10/15]

GlobalDecl::GlobalDecl ( const OMPDeclareMapperDecl * D)

Definition at line 25 of file GlobalDecl.cpp.

References clang::Init.

◆ GlobalDecl() [11/15]

GlobalDecl::GlobalDecl ( const OpenACCRoutineDecl * D)

Definition at line 26 of file GlobalDecl.cpp.

References clang::Init.

◆ GlobalDecl() [12/15]

GlobalDecl::GlobalDecl ( const OpenACCDeclareDecl * D)

Definition at line 27 of file GlobalDecl.cpp.

References clang::Init.

◆ GlobalDecl() [13/15]

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

Definition at line 101 of file GlobalDecl.h.

◆ GlobalDecl() [14/15]

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

Definition at line 102 of file GlobalDecl.h.

◆ GlobalDecl() [15/15]

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

Definition at line 103 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 115 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::CIRGen::CIRGenModule::codegenCXXStructor(), clang::CodeGen::CodeGenModule::codegenCXXStructor(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CIRGen::CIRGenModule::constructAttributeList(), clang::CIRGen::CIRGenModule::emitAliasDefinition(), clang::CIRGen::CIRGenModule::emitAliasForGlobal(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), EmitDirectCallee(), clang::CodeGen::CGDebugInfo::EmitFuncDeclForCallSite(), 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::CIRGen::CIRGenOpenMPRuntime::emitTargetGlobal(), 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::CIRGen::EHPersonality::get(), 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(), getKernelReferenceKind(), clang::CIRGen::CIRGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getMangledName(), clang::MicrosoftVTableContext::getMethodVFTableLocation(), clang::ItaniumVTableContext::getMethodVTableIndex(), getMultiVersionIndex(), getMultiversionLinkage(), 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::CIRGen::CIRGenOpenMPRuntime::markAsGlobalTarget(), clang::CodeGen::CGOpenMPRuntime::markAsGlobalTarget(), clang::CIRGen::CIRGenVTables::maybeEmitThunk(), 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(), setThunkProperties(), clang::CIRGen::CIRGenModule::shouldEmitFunction(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CIRGen::CIRGenFunction::startFunction(), clang::CodeGen::CodeGenFunction::StartThunk(), clang::CIRGen::CIRGenFunction::startThunk(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), clang::CodeGen::CodeGenModule::tryEmitCUDADeviceInvalidFunctionBody(), and clang::ASTContext::useAbbreviatedThunkName().

◆ getDefaultKernelReference()

KernelReferenceKind GlobalDecl::getDefaultKernelReference ( const FunctionDecl * D)
static

◆ getDtorType()

◆ getDynamicInitKind()

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

Definition at line 127 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 161 of file GlobalDecl.h.

References GlobalDecl().

◆ getKernelReferenceKind()

◆ getMultiVersionIndex()

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

Definition at line 134 of file GlobalDecl.h.

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

Referenced by clang::ASTContext::getFunctionFeatureMap(), and getMangledNameImpl().

◆ getWithCtorType()

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

Definition at line 176 of file GlobalDecl.h.

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

◆ getWithDecl()

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

Definition at line 170 of file GlobalDecl.h.

References GlobalDecl(), and clang::Result.

Referenced by getMangledNameImpl(), getMangledNameImpl(), isTemplate(), and isTemplate().

◆ 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 190 of file GlobalDecl.h.

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

◆ operator bool()

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

Definition at line 159 of file GlobalDecl.h.

References getAsOpaquePtr().

◆ operator!=()

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

Definition at line 153 of file GlobalDecl.h.

References GlobalDecl(), and clang::Other.

◆ operator==

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

Definition at line 148 of file GlobalDecl.h.

References GlobalDecl().


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