diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-24 21:56:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-24 21:56:08 +0000 |
commit | c266de97e269c3747ffc2d122fe53185b541cb37 (patch) | |
tree | 70a14228156575261cd16cc68a5472d61e1d7700 /lib/AST/DeclBase.cpp | |
parent | e94cb98d39fcd2cca68ab1b0d71f9a16b5e934c1 (diff) |
Don't force the complete deserialization of the visible-declarations
table when serializing an AST file. This was a holdover from the days
before chained PCH, and is a complete waste of time and storage
now. It's a good thing it's useless, because I have no idea how I
would have implemented MaterializeVisibleDecls efficiently in the
presence of modules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index ca3f5b563c..d179f7bfea 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -910,25 +910,6 @@ ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC, return List.getLookupResult(); } -void ExternalASTSource::MaterializeVisibleDeclsForName(const DeclContext *DC, - DeclarationName Name, - SmallVectorImpl<NamedDecl*> &Decls) { - assert(DC->LookupPtr); - StoredDeclsMap &Map = *DC->LookupPtr; - - // If there's an entry in the table the visible decls for this name have - // already been deserialized. - if (Map.find(Name) == Map.end()) { - StoredDeclsList &List = Map[Name]; - for (unsigned I = 0, N = Decls.size(); I != N; ++I) { - if (List.isNull()) - List.setOnlyValue(Decls[I]); - else - List.AddSubsequentDecl(Decls[I]); - } - } -} - DeclContext::decl_iterator DeclContext::noload_decls_begin() const { return decl_iterator(FirstDecl); } @@ -1207,15 +1188,6 @@ void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D) { DeclNameEntries.AddSubsequentDecl(D); } -void DeclContext::MaterializeVisibleDeclsFromExternalStorage() { - ExternalASTSource *Source = getParentASTContext().getExternalSource(); - assert(hasExternalVisibleStorage() && Source && "No external storage?"); - - if (!LookupPtr) - CreateStoredDeclsMap(getParentASTContext()); - Source->MaterializeVisibleDecls(this); -} - /// Returns iterator range [First, Last) of UsingDirectiveDecls stored within /// this context. DeclContext::udir_iterator_range |