diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-10 17:25:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-10 17:25:41 +0000 |
commit | 8038d5182b72dcdef292f6fb8539ad77f338855a (patch) | |
tree | 4a8a1b58b68c1d84ad9c10afa0f262b917b67eb4 /lib/AST/DeclBase.cpp | |
parent | f04ad69fed38d26fc0d6f7d6fd0a4631ddfbc7fe (diff) |
Various minor fixes to PCH reading and writing, with general
cleanup. Aside from a minor tweak to the PCH file format, no
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index be349428ec..62783b140f 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -519,6 +519,13 @@ DeclContext::decl_iterator DeclContext::decls_end(ASTContext &Context) const { return decl_iterator(); } +bool DeclContext::decls_empty(ASTContext &Context) const { + if (hasExternalLexicalStorage()) + LoadLexicalDeclsFromExternalStorage(Context); + + return !FirstDecl; +} + void DeclContext::addDecl(ASTContext &Context, Decl *D) { assert(D->getLexicalDeclContext() == this && "Decl inserted into wrong lexical context"); |