clang 20.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
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 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 56 of file GlobalDecl.h.

Constructor & Destructor Documentation

◆ GlobalDecl() [1/13]

clang::GlobalDecl::GlobalDecl ( )
default

◆ GlobalDecl() [2/13]

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

Definition at line 70 of file GlobalDecl.h.

References D, and clang::Init.

◆ GlobalDecl() [3/13]

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

Definition at line 71 of file GlobalDecl.h.

References D, getDefaultKernelReference(), and clang::Init.

◆ GlobalDecl() [4/13]

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

Definition at line 79 of file GlobalDecl.h.

References D.

◆ GlobalDecl() [5/13]

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

Definition at line 83 of file GlobalDecl.h.

References D, and clang::Init.

◆ GlobalDecl() [6/13]

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

Definition at line 84 of file GlobalDecl.h.

References D, and clang::Init.

◆ GlobalDecl() [7/13]

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

Definition at line 85 of file GlobalDecl.h.

References D, and clang::Init.

◆ GlobalDecl() [8/13]

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

Definition at line 86 of file GlobalDecl.h.

References D, and clang::Init.

◆ GlobalDecl() [9/13]

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

Definition at line 87 of file GlobalDecl.h.

References D, and clang::Init.

◆ GlobalDecl() [10/13]

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

Definition at line 88 of file GlobalDecl.h.

References D, and clang::Init.

◆ GlobalDecl() [11/13]

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

Definition at line 89 of file GlobalDecl.h.

◆ GlobalDecl() [12/13]

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

Definition at line 90 of file GlobalDecl.h.

◆ GlobalDecl() [13/13]

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

Definition at line 91 of file GlobalDecl.h.

Member Function Documentation

◆ getAsOpaquePtr()

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

◆ getCanonicalDecl()

GlobalDecl clang::GlobalDecl::getCanonicalDecl ( ) const
inline

◆ getCtorType()

CXXCtorType clang::GlobalDecl::getCtorType ( ) const
inline

◆ getDecl()

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

Definition at line 103 of file GlobalDecl.h.

Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), asTemplateName(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::CodeGen::CodeGenModule::codegenCXXStructor(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), EmitDirectCallee(), clang::CodeGen::CGDebugInfo::EmitFunctionDecl(), EmitFunctionDeclLValue(), clang::CodeGen::CGDebugInfo::emitFunctionStart(), clang::CodeGen::CodeGenModule::EmitGlobal(), clang::CodeGen::CGDebugInfo::EmitGlobalAlias(), clang::CodeGen::CGDebugInfo::EmitInlineFunctionStart(), clang::CodeGen::CGOpenMPRuntime::emitTargetFunctions(), clang::CodeGen::CGOpenMPRuntime::emitTargetGlobal(), clang::CodeGen::CGOpenMPRuntime::emitTargetGlobalVariable(), clang::CodeGen::CodeGenVTables::EmitThunks(), clang::ItaniumVTableContext::findOriginalMethod(), clang::CodeGen::EHPersonality::get(), clang::CodeGen::CodeGenModule::getAddrAndTypeOfCXXStructor(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CodeGenModule::GetAddrOfGlobal(), clang::CodeGen::CodeGenModule::getBlockMangledName(), getCtorType(), getDtorType(), getDynamicInitKind(), clang::ASTContext::getFunctionFeatureMap(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), clang::CodeGen::CodeGenModule::getFunctionPointer(), clang::CodeGen::CodeGenTypes::GetFunctionTypeForVTable(), getKernelReferenceKind(), clang::CodeGen::CodeGenModule::getMangledName(), clang::MicrosoftVTableContext::getMethodVFTableLocation(), clang::ItaniumVTableContext::getMethodVTableIndex(), getMultiVersionIndex(), getMultiversionLinkage(), clang::CodeGen::CodeGenModule::GetOrCreateLLVMGlobal(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenModule::getRawFunctionPointer(), clang::CodeGen::CGCXXABI::getThisArgumentTypeForMethod(), clang::VTableContextBase::getThunkInfo(), clang::MicrosoftVTableContext::getThunkInfo(), getWithCtorType(), getWithDtorType(), getWithKernelReferenceKind(), getWithMultiVersionIndex(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), isDeletingDtor(), isTemplate(), isUniqueInternalLinkageDecl(), clang::MangleContext::mangleName(), clang::CodeGen::CGOpenMPRuntime::markAsGlobalTarget(), clang::CodeGen::CodeGenModule::SetCommonAttributes(), clang::CodeGen::CodeGenModule::setDLLImportDLLExport(), clang::CodeGen::CodeGenModule::setGVProperties(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), and clang::ASTContext::useAbbreviatedThunkName().

◆ getDefaultKernelReference()

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

Definition at line 162 of file GlobalDecl.h.

References D, clang::Kernel, and clang::Stub.

Referenced by GlobalDecl().

◆ getDtorType()

CXXDtorType clang::GlobalDecl::getDtorType ( ) const
inline

◆ getDynamicInitKind()

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

Definition at line 115 of file GlobalDecl.h.

References getDecl().

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

◆ getFromOpaquePtr()

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

Definition at line 156 of file GlobalDecl.h.

References P.

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

◆ getKernelReferenceKind()

KernelReferenceKind clang::GlobalDecl::getKernelReferenceKind ( ) const
inline

Definition at line 132 of file GlobalDecl.h.

References getDecl().

Referenced by getMangledNameImpl().

◆ getMultiVersionIndex()

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

Definition at line 122 of file GlobalDecl.h.

References getDecl().

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

◆ getWithCtorType()

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

Definition at line 173 of file GlobalDecl.h.

References getDecl(), and clang::Result.

◆ getWithDecl()

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

Definition at line 167 of file GlobalDecl.h.

References D, and clang::Result.

Referenced by getMangledNameImpl(), and isTemplate().

◆ getWithDtorType()

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

Definition at line 180 of file GlobalDecl.h.

References getDecl(), and clang::Result.

Referenced by clang::CodeGen::CodeGenModule::getAddrAndTypeOfCXXStructor().

◆ getWithKernelReferenceKind()

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

Definition at line 198 of file GlobalDecl.h.

References getDecl(), Kind, and clang::Result.

Referenced by clang::CodeGen::CodeGenModule::getMangledName().

◆ getWithMultiVersionIndex()

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

Definition at line 187 of file GlobalDecl.h.

References getDecl(), and clang::Result.

◆ operator bool()

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

Definition at line 154 of file GlobalDecl.h.

References getAsOpaquePtr().

◆ operator!=()

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

Definition at line 148 of file GlobalDecl.h.

References clang::Other.

Friends And Related Function Documentation

◆ operator==

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

Definition at line 143 of file GlobalDecl.h.


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