15 #ifndef LLVM_CLANG_AST_GLOBALDECL_H
16 #define LLVM_CLANG_AST_GLOBALDECL_H
30 llvm::PointerIntPair<const Decl*, 2>
Value;
32 void Init(
const Decl *D) {
33 assert(!isa<CXXConstructorDecl>(D) &&
"Use other ctor with ctor decls!");
34 assert(!isa<CXXDestructorDecl>(D) &&
"Use other ctor with dtor decls!");
56 CanonGD.Value.setPointer(
Value.getPointer()->getCanonicalDecl());
57 CanonGD.Value.setInt(
Value.getInt());
65 assert(isa<CXXConstructorDecl>(
getDecl()) &&
"Decl is not a ctor!");
70 assert(isa<CXXDestructorDecl>(
getDecl()) &&
"Decl is not a dtor!");
75 return LHS.Value == RHS.Value;
82 GD.Value.setFromOpaqueValue(P);
88 Result.Value.setPointer(D);
96 template<
class>
struct DenseMapInfo;
123 static const bool value =
true;
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
GlobalDecl getWithDecl(const Decl *D)
CXXCtorType getCtorType() const
GlobalDecl(const VarDecl *D)
static clang::GlobalDecl getEmptyKey()
The base class of the type hierarchy.
Represents a C++ constructor within a class.
static GlobalDecl getFromOpaquePtr(void *P)
VarDecl - An instance of this class is created to represent a variable declaration or definition...
ObjCMethodDecl - Represents an instance or class method declaration.
GlobalDecl getCanonicalDecl() const
static bool isEqual(clang::GlobalDecl LHS, clang::GlobalDecl RHS)
static unsigned getHashValue(clang::GlobalDecl GD)
GlobalDecl(const CXXDestructorDecl *D, CXXDtorType Type)
GlobalDecl(const CapturedDecl *D)
const Decl * getDecl() const
GlobalDecl(const CXXConstructorDecl *D, CXXCtorType Type)
Enums/classes describing ABI related information about constructors, destructors and thunks...
GlobalDecl(const OMPDeclareReductionDecl *D)
This represents the body of a CapturedStmt, and serves as its DeclContext.
void * getAsOpaquePtr() const
CXXDtorType
C++ destructor types.
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
CXXDtorType getDtorType() const
Represents a C++ destructor within a class.
The result type of a method or function.
GlobalDecl - represents a global declaration.
static clang::GlobalDecl getTombstoneKey()
This represents '#pragma omp declare reduction ...' directive.
GlobalDecl(const ObjCMethodDecl *D)
GlobalDecl(const FunctionDecl *D)
This file defines OpenMP nodes for declarative directives.
CXXCtorType
C++ constructor types.
GlobalDecl(const BlockDecl *D)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
friend bool operator==(const GlobalDecl &LHS, const GlobalDecl &RHS)