diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-10-27 19:49:05 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-10-27 19:49:05 +0000 |
| commit | 417e87cb96cae7713f84d96c7dd2cfafb7364f23 (patch) | |
| tree | 87a0b10aa9bb9ce52a1570017d6edaf308e2e76c /clang/lib/AST/Decl.cpp | |
| parent | 40d24a4abf5eff56bb038200ce3a0c134e943bf6 (diff) | |
| download | bcm5719-llvm-417e87cb96cae7713f84d96c7dd2cfafb7364f23.tar.gz bcm5719-llvm-417e87cb96cae7713f84d96c7dd2cfafb7364f23.zip | |
Lazily load the "next" namespace in the chain of NamespaceDecls, to
eliminate some excessive recursion and deserialization.
llvm-svn: 117476
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 5cc745d40de..9c7654b9cbe 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1911,6 +1911,11 @@ NamespaceDecl *NamespaceDecl::Create(ASTContext &C, DeclContext *DC, return new (C) NamespaceDecl(DC, L, Id); } +NamespaceDecl *NamespaceDecl::getNextNamespace() { + return dyn_cast_or_null<NamespaceDecl>( + NextNamespace.get(getASTContext().getExternalSource())); +} + ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T) { return new (C) ImplicitParamDecl(ImplicitParam, DC, L, Id, T); |

