diff options
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 4399fdcb2f9..01e9f220f97 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -3513,11 +3513,11 @@ ASTWriter::GenerateNameLookupTable(const DeclContext *ConstDC, auto &Name = Lookup.first; auto &Result = Lookup.second; - // If there are no local declarations in our lookup result, we don't - // need to write an entry for the name at all unless we're rewriting - // the decl context. If we can't write out a lookup set without - // performing more deserialization, just skip this entry. - if (isLookupResultExternal(Result, DC) && !isRewritten(cast<Decl>(DC)) && + // If there are no local declarations in our lookup result, we + // don't need to write an entry for the name at all. If we can't + // write out a lookup set without performing more deserialization, + // just skip this entry. + if (isLookupResultExternal(Result, DC) && isLookupResultEntirelyExternal(Result, DC)) continue; @@ -3758,9 +3758,6 @@ uint64_t ASTWriter::WriteDeclContextVisibleBlock(ASTContext &Context, /// (in C++), for namespaces, and for classes with forward-declared unscoped /// enumeration members (in C++11). void ASTWriter::WriteDeclContextVisibleUpdate(const DeclContext *DC) { - if (isRewritten(cast<Decl>(DC))) - return; - StoredDeclsMap *Map = DC->getLookupPtr(); if (!Map || Map->empty()) return; @@ -4376,10 +4373,6 @@ uint64_t ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot, Stream.EnterSubblock(DECLTYPES_BLOCK_ID, /*bits for abbreviations*/5); WriteTypeAbbrevs(); WriteDeclAbbrevs(); - for (DeclsToRewriteTy::iterator I = DeclsToRewrite.begin(), - E = DeclsToRewrite.end(); - I != E; ++I) - DeclTypesToEmit.push(const_cast<Decl*>(*I)); do { WriteDeclUpdatesBlocks(DeclUpdatesOffsetsRecord); while (!DeclTypesToEmit.empty()) { @@ -4545,8 +4538,6 @@ void ASTWriter::WriteDeclUpdatesBlocks(RecordDataImpl &OffsetsRecord) { for (auto &DeclUpdate : LocalUpdates) { const Decl *D = DeclUpdate.first; - if (isRewritten(D)) - continue; // The decl will be written completely,no need to store updates. bool HasUpdatedBody = false; RecordData Record; |