diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-28 00:53:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-28 00:53:40 +0000 |
commit | 32002197b278ff73589ae2b6bcec689b0760cf93 (patch) | |
tree | e3eafc900ff525137c0ab40601ad191b7304e29a /clang/lib/Serialization/ASTReader.cpp | |
parent | 8a815152c2d8246495d9e7524dabedeb745289ba (diff) | |
download | bcm5719-llvm-32002197b278ff73589ae2b6bcec689b0760cf93.tar.gz bcm5719-llvm-32002197b278ff73589ae2b6bcec689b0760cf93.zip |
Switch Sema::DynamicClasses over to LazyVector
llvm-svn: 136317
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index e8ae251e5a8..8b2d1a270e7 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -4341,9 +4341,6 @@ void ASTReader::InitializeSema(Sema &S) { // If there were any dynamic classes declarations, deserialize them // and add them to Sema's vector of such declarations. - for (unsigned I = 0, N = DynamicClasses.size(); I != N; ++I) - SemaObj->DynamicClasses.push_back( - cast<CXXRecordDecl>(GetDecl(DynamicClasses[I]))); // Load the offsets of the declarations that Sema references. // They will be lazily deserialized when needed. @@ -4586,6 +4583,16 @@ void ASTReader::ReadExtVectorDecls(SmallVectorImpl<TypedefNameDecl *> &Decls) { ExtVectorDecls.clear(); } +void ASTReader::ReadDynamicClasses(SmallVectorImpl<CXXRecordDecl *> &Decls) { + for (unsigned I = 0, N = DynamicClasses.size(); I != N; ++I) { + CXXRecordDecl *D + = dyn_cast_or_null<CXXRecordDecl>(GetDecl(DynamicClasses[I])); + if (D) + Decls.push_back(D); + } + DynamicClasses.clear(); +} + void ASTReader::LoadSelector(Selector Sel) { // It would be complicated to avoid reading the methods anyway. So don't. ReadMethodPool(Sel); |