llvm::PointerIntPair<const Decl *, 3>
Value;
58 unsignedMultiVersionIndex = 0;
61assert(!isa<CXXConstructorDecl>(
D) &&
"Use other ctor with ctor decls!");
62assert(!isa<CXXDestructorDecl>(
D) &&
"Use other ctor with dtor decls!");
63assert(!
D->hasAttr<CUDAGlobalAttr>() &&
"Use other ctor with GPU kernels!");
72: MultiVersionIndex(MVIndex) {
73 if(!
D->hasAttr<CUDAGlobalAttr>()) {
81assert(
D->hasAttr<CUDAGlobalAttr>() &&
"Decl is not a GPU kernel!");
96CanonGD.Value.setPointer(
Value.getPointer()->getCanonicalDecl());
97CanonGD.Value.setInt(
Value.getInt());
98CanonGD.MultiVersionIndex = MultiVersionIndex;
106assert(isa<CXXConstructorDecl>(
getDecl()) &&
"Decl is not a ctor!");
111assert(isa<CXXDestructorDecl>(
getDecl()) &&
"Decl is not a dtor!");
116assert(isa<VarDecl>(
getDecl()) &&
117cast<VarDecl>(
getDecl())->hasGlobalStorage() &&
118 "Decl is not a global variable!");
123assert(isa<FunctionDecl>(
125!cast<FunctionDecl>(
getDecl())->hasAttr<CUDAGlobalAttr>() &&
126!isa<CXXConstructorDecl>(
getDecl()) &&
127!isa<CXXDestructorDecl>(
getDecl()) &&
128 "Decl is not a plain FunctionDecl!");
129 returnMultiVersionIndex;
133assert(((isa<FunctionDecl>(
getDecl()) &&
134cast<FunctionDecl>(
getDecl())->hasAttr<CUDAGlobalAttr>()) ||
135(isa<FunctionTemplateDecl>(
getDecl()) &&
136cast<FunctionTemplateDecl>(
getDecl())
138->hasAttr<CUDAGlobalAttr>())) &&
139 "Decl is not a GPU kernel!");
144 returnLHS.Value == RHS.Value &&
145LHS.MultiVersionIndex == RHS.MultiVersionIndex;
149 return!(*
this==
Other);
158GD.Value.setFromOpaqueValue(
P);
174assert(isa<CXXConstructorDecl>(
getDecl()));
181assert(isa<CXXDestructorDecl>(
getDecl()));
188assert(isa<FunctionDecl>(
getDecl()) &&
189!cast<FunctionDecl>(
getDecl())->hasAttr<CUDAGlobalAttr>() &&
190!isa<CXXConstructorDecl>(
getDecl()) &&
191!isa<CXXDestructorDecl>(
getDecl()) &&
192 "Decl is not a plain FunctionDecl!");
194 Result.MultiVersionIndex = Index;
199assert(isa<FunctionDecl>(
getDecl()) &&
200cast<FunctionDecl>(
getDecl())->hasAttr<CUDAGlobalAttr>() &&
201 "Decl is not a GPU kernel!");
212 template<>
structDenseMapInfo<
clang::GlobalDecl> {
Enums/classes describing ABI related information about constructors, destructors and thunks.
enum clang::sema::@1704::IndirectLocalPathEntry::EntryKind Kind
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
This file defines OpenMP nodes for declarative directives.
Defines the C++ template declaration subclasses.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Represents a C++ constructor within a class.
Represents a C++ destructor within a class.
Represents the body of a CapturedStmt, and serves as its DeclContext.
Decl - This represents one declaration (or definition), e.g.
Represents a function declaration or definition.
GlobalDecl - represents a global declaration.
GlobalDecl(const OMPDeclareReductionDecl *D)
GlobalDecl(const CapturedDecl *D)
GlobalDecl getWithMultiVersionIndex(unsigned Index)
GlobalDecl getWithCtorType(CXXCtorType Type)
GlobalDecl(const FunctionDecl *D, KernelReferenceKind Kind)
CXXCtorType getCtorType() const
GlobalDecl(const FunctionDecl *D, unsigned MVIndex=0)
GlobalDecl getWithKernelReferenceKind(KernelReferenceKind Kind)
GlobalDecl getCanonicalDecl() const
friend bool operator==(const GlobalDecl &LHS, const GlobalDecl &RHS)
GlobalDecl(const VarDecl *D)
KernelReferenceKind getKernelReferenceKind() const
static GlobalDecl getFromOpaquePtr(void *P)
GlobalDecl getWithDecl(const Decl *D)
unsigned getMultiVersionIndex() const
void * getAsOpaquePtr() const
GlobalDecl(const CXXConstructorDecl *D, CXXCtorType Type)
DynamicInitKind getDynamicInitKind() const
GlobalDecl getWithDtorType(CXXDtorType Type)
GlobalDecl(const OMPDeclareMapperDecl *D)
bool operator!=(const GlobalDecl &Other) const
GlobalDecl(const VarDecl *D, DynamicInitKind StubKind)
static KernelReferenceKind getDefaultKernelReference(const FunctionDecl *D)
CXXDtorType getDtorType() const
const Decl * getDecl() const
GlobalDecl(const BlockDecl *D)
GlobalDecl(const CXXDestructorDecl *D, CXXDtorType Type)
GlobalDecl(const ObjCMethodDecl *D)
GlobalDecl(const NamedDecl *D)
This represents a decl that may have a name.
This represents '#pragma omp declare mapper ...' directive.
This represents '#pragma omp declare reduction ...' directive.
ObjCMethodDecl - Represents an instance or class method declaration.
The base class of the type hierarchy.
Represents a variable declaration or definition.
The JSON file list parser is used to communicate input to InstallAPI.
CXXCtorType
C++ constructor types.
@ Result
The result type of a method or function.
CXXDtorType
C++ destructor types.
@ Other
Other implicit parameter.
Diagnostic wrappers for TextAPI types for error reporting.
static bool isEqual(clang::GlobalDecl LHS, clang::GlobalDecl RHS)
static clang::GlobalDecl getTombstoneKey()
static unsigned getHashValue(clang::GlobalDecl GD)
static clang::GlobalDecl getEmptyKey()
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4