15 #ifndef LLVM_CLANG_AST_GLOBALDECL_H
16 #define LLVM_CLANG_AST_GLOBALDECL_H
29 llvm::PointerIntPair<const Decl*, 2>
Value;
31 void Init(
const Decl *D) {
32 assert(!isa<CXXConstructorDecl>(D) &&
"Use other ctor with ctor decls!");
33 assert(!isa<CXXDestructorDecl>(D) &&
"Use other ctor with dtor decls!");
54 CanonGD.Value.setPointer(
Value.getPointer()->getCanonicalDecl());
55 CanonGD.Value.setInt(
Value.getInt());
63 assert(isa<CXXConstructorDecl>(
getDecl()) &&
"Decl is not a ctor!");
68 assert(isa<CXXDestructorDecl>(
getDecl()) &&
"Decl is not a dtor!");
73 return LHS.Value == RHS.Value;
80 GD.Value.setFromOpaqueValue(P);
86 Result.Value.setPointer(D);
94 template<
class>
struct DenseMapInfo;
121 static const bool value =
true;
GlobalDecl getWithDecl(const Decl *D)
CXXCtorType getCtorType() const
GlobalDecl(const VarDecl *D)
static clang::GlobalDecl getEmptyKey()
Represents a C++ constructor within a class.
static GlobalDecl getFromOpaquePtr(void *P)
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...
This represents the body of a CapturedStmt, and serves as its DeclContext.
void * getAsOpaquePtr() const
CXXDtorType
C++ destructor types.
CXXDtorType getDtorType() const
Represents a C++ destructor within a class.
The result type of a method or function.
static clang::GlobalDecl getTombstoneKey()
GlobalDecl(const ObjCMethodDecl *D)
GlobalDecl(const FunctionDecl *D)
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)