diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-28 00:39:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-28 00:39:29 +0000 |
commit | d58a0a55e64a7c410a80e9d6dcd899e61e99cc4d (patch) | |
tree | 28a93fdcdb9585ac6d33cfea85d67e17d70fb5d1 /lib/Serialization/ASTReader.cpp | |
parent | 886fefadb64bcb747e2109ffeb5260e098c89517 (diff) |
Switch Sema::ExtVectorDecls over to LazyVector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index d39029ac6f..e8ae251e5a 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -4336,12 +4336,6 @@ void ASTReader::InitializeSema(Sema &S) { SemaObj->LocallyScopedExternalDecls[D->getDeclName()] = D; } - // If there were any ext_vector type declarations, deserialize them - // and add them to Sema's vector of such declarations. - for (unsigned I = 0, N = ExtVectorDecls.size(); I != N; ++I) - SemaObj->ExtVectorDecls.push_back( - cast<TypedefNameDecl>(GetDecl(ExtVectorDecls[I]))); - // FIXME: Do VTable uses and dynamic classes deserialize too much ? // Can we cut them down before writing them ? @@ -4582,6 +4576,16 @@ void ASTReader::ReadDelegatingConstructors( DelegatingCtorDecls.clear(); } +void ASTReader::ReadExtVectorDecls(SmallVectorImpl<TypedefNameDecl *> &Decls) { + for (unsigned I = 0, N = ExtVectorDecls.size(); I != N; ++I) { + TypedefNameDecl *D + = dyn_cast_or_null<TypedefNameDecl>(GetDecl(ExtVectorDecls[I])); + if (D) + Decls.push_back(D); + } + ExtVectorDecls.clear(); +} + void ASTReader::LoadSelector(Selector Sel) { // It would be complicated to avoid reading the methods anyway. So don't. ReadMethodPool(Sel); |