diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-27 21:57:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-27 21:57:17 +0000 |
commit | bae31201bb913b9f7bf75cad4fef9ed9a0dffe47 (patch) | |
tree | 89ce644679d7981d1edb52c233af197424184e62 /clang/lib/Serialization/ASTReader.cpp | |
parent | 121c21aba94f0113d0ce71a1e35e41389e5d03ce (diff) | |
download | bcm5719-llvm-bae31201bb913b9f7bf75cad4fef9ed9a0dffe47.tar.gz bcm5719-llvm-bae31201bb913b9f7bf75cad4fef9ed9a0dffe47.zip |
Turn Sema::DelegatingCtorDecls into a LazyVector.
llvm-svn: 136273
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index ba504540706..d39029ac6fe 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -4328,13 +4328,6 @@ void ASTReader::InitializeSema(Sema &S) { } PreloadedDecls.clear(); - // If there were any delegating constructors, add them to Sema's list - for (unsigned I = 0, N = DelegatingCtorDecls.size(); I != N; ++I) { - CXXConstructorDecl *D - = cast<CXXConstructorDecl>(GetDecl(DelegatingCtorDecls[I])); - SemaObj->DelegatingCtorDecls.push_back(D); - } - // If there were any locally-scoped external declarations, // deserialize them and add them to Sema's table of locally-scoped // external declarations. @@ -4578,6 +4571,17 @@ void ASTReader::ReadUnusedFileScopedDecls( UnusedFileScopedDecls.clear(); } +void ASTReader::ReadDelegatingConstructors( + SmallVectorImpl<CXXConstructorDecl *> &Decls) { + for (unsigned I = 0, N = DelegatingCtorDecls.size(); I != N; ++I) { + CXXConstructorDecl *D + = dyn_cast_or_null<CXXConstructorDecl>(GetDecl(DelegatingCtorDecls[I])); + if (D) + Decls.push_back(D); + } + DelegatingCtorDecls.clear(); +} + void ASTReader::LoadSelector(Selector Sel) { // It would be complicated to avoid reading the methods anyway. So don't. ReadMethodPool(Sel); |