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 | 1e9bf3bad4934c49694ddc273c4b3b88cd6cd5b7 (patch) | |
tree | 72035207a585f380ac5ead2e6bea81bcf21dc9bb /clang/lib/AST/DeclBase.cpp | |
parent | 0910e3b92e1c60f878525b9d3f7c1e9f9caad791 (diff) | |
download | bcm5719-llvm-1e9bf3bad4934c49694ddc273c4b3b88cd6cd5b7.tar.gz bcm5719-llvm-1e9bf3bad4934c49694ddc273c4b3b88cd6cd5b7.zip |
Various minor fixes to PCH reading and writing, with general
cleanup. Aside from a minor tweak to the PCH file format, no
functionality change.
llvm-svn: 68793
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index be349428ecf..62783b140f9 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/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"); |