aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclBase.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-07 17:20:56 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-07 17:20:56 +0000
commitc2ee10d79f70036af652a395ac1f8273f3d04e12 (patch)
treed6db3c7d97d104967ff017f0687d14bb0e658bb5 /include/clang/AST/DeclBase.h
parent82fc0cb7883747942326d6d6ca1333b27bd647f0 (diff)
Move the internal DeclContext data structures into a separate header.
Simplify the addition of a case statement to a switch. Fix -print-stats for attribute-qualified types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclBase.h')
-rw-r--r--include/clang/AST/DeclBase.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index abdb10dcbc..4194ba0459 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -375,10 +375,6 @@ class DeclContext {
/// another pointer.
Decl *LastDecl;
- /// isLookupMap - Determine if the lookup structure is a
- /// DenseMap. Othewise, it is an array.
- bool isLookupMap() const { return LookupPtr.getInt() == LookupIsMap; }
-
protected:
DeclContext(Decl::Kind K)
: DeclKind(K), LookupPtr(), FirstDecl(0), LastDecl(0) { }
@@ -761,6 +757,15 @@ public:
return getUsingDirectives().second;
}
+ // Low-level accessors
+
+ /// \brief Determine if the lookup structure is a
+ /// DenseMap. Othewise, it is an array.
+ bool isLookupMap() const { return LookupPtr.getInt() == LookupIsMap; }
+
+ /// \brief Retrieve the internal representation of the lookup structure.
+ llvm::PointerIntPair<void*, 3> getLookupPtr() const { return LookupPtr; }
+
static bool classof(const Decl *D);
static bool classof(const DeclContext *D) { return true; }
#define DECL_CONTEXT(Name) \