[cfe-commits] r138816 - /cfe/trunk/lib/Serialization/ASTWriter.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Aug 30 12:43:23 PDT 2011
Author: akirtzidis
Date: Tue Aug 30 14:43:23 2011
New Revision: 138816
URL: http://llvm.org/viewvc/llvm-project?rev=138816&view=rev
Log:
In ASTWriter::WriteDeclContextVisibleBlock, don't write empty lookups.
Empty lookups can occur in the DeclContext map when we are chaining PCHs, where
the empty lookup indicates that we already looked in ExternalASTSource.
Modified:
cfe/trunk/lib/Serialization/ASTWriter.cpp
Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=138816&r1=138815&r2=138816&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Tue Aug 30 14:43:23 2011
@@ -2628,7 +2628,8 @@
D != DEnd; ++D) {
DeclarationName Name = D->first;
DeclContext::lookup_result Result = D->second.getLookupResult();
- Generator.insert(Name, Result, Trait);
+ if (Result.first != Result.second)
+ Generator.insert(Name, Result, Trait);
}
// Create the on-disk hash table in a buffer.
@@ -2673,7 +2674,8 @@
DeclContext::lookup_result Result = D->second.getLookupResult();
// For any name that appears in this table, the results are complete, i.e.
// they overwrite results from previous PCHs. Merging is always a mess.
- Generator.insert(Name, Result, Trait);
+ if (Result.first != Result.second)
+ Generator.insert(Name, Result, Trait);
}
// Create the on-disk hash table in a buffer.
More information about the cfe-commits
mailing list