From bae31201bb913b9f7bf75cad4fef9ed9a0dffe47 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 27 Jul 2011 21:57:17 +0000 Subject: Turn Sema::DelegatingCtorDecls into a LazyVector. llvm-svn: 136273 --- clang/lib/Serialization/ASTReader.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'clang/lib/Serialization/ASTReader.cpp') 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(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 &Decls) { + for (unsigned I = 0, N = DelegatingCtorDecls.size(); I != N; ++I) { + CXXConstructorDecl *D + = dyn_cast_or_null(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); -- cgit v1.2.3