Home | History | Annotate | Download | only in AST

Lines Matching defs:GlobalDecl

1 //===--- GlobalDecl.h - Global declaration holder ---------------*- C++ -*-===//
10 // A GlobalDecl can hold either a regular variable/function or a C++ ctor/dtor
25 /// GlobalDecl - represents a global declaration. This can either be a
29 class GlobalDecl {
40 GlobalDecl() {}
42 GlobalDecl(const VarDecl *D) { Init(D);}
43 GlobalDecl(const FunctionDecl *D) { Init(D); }
44 GlobalDecl(const BlockDecl *D) { Init(D); }
45 GlobalDecl(const CapturedDecl *D) { Init(D); }
46 GlobalDecl(const ObjCMethodDecl *D) { Init(D); }
47 GlobalDecl(const OMPDeclareReductionDecl *D) { Init(D); }
49 GlobalDecl(const CXXConstructorDecl *D, CXXCtorType Type)
51 GlobalDecl(const CXXDestructorDecl *D, CXXDtorType Type)
54 GlobalDecl getCanonicalDecl() const {
55 GlobalDecl CanonGD;
74 friend bool operator==(const GlobalDecl &LHS, const GlobalDecl &RHS) {
80 static GlobalDecl getFromOpaquePtr(void *P) {
81 GlobalDecl GD;
86 GlobalDecl getWithDecl(const Decl *D) {
87 GlobalDecl Result(*this);
98 template<> struct DenseMapInfo<clang::GlobalDecl> {
99 static inline clang::GlobalDecl getEmptyKey() {
100 return clang::GlobalDecl();
103 static inline clang::GlobalDecl getTombstoneKey() {
104 return clang::GlobalDecl::
108 static unsigned getHashValue(clang::GlobalDecl GD) {
112 static bool isEqual(clang::GlobalDecl LHS,
113 clang::GlobalDecl RHS) {
119 // GlobalDecl isn't *technically* a POD type. However, its copy constructor,
122 struct isPodLike<clang::GlobalDecl> {