From: Richard Smith Date: Thu, 6 Aug 2015 21:09:44 +0000 (+0000) Subject: [modules] Remove now-unused MergedLookups map. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c12edfe500ba9304816d95651b4d1b1c6dc2f4ac;p=clang [modules] Remove now-unused MergedLookups map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244277 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 333d8d9a08..227ac50d8f 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -977,13 +977,6 @@ private: /// module is loaded. SmallVector ObjCClassesLoaded; - /// \brief A mapping from a primary context for a declaration chain to the - /// other declarations of that entity that also have name lookup tables. - /// Used when we merge together two class definitions that have different - /// sets of declared special member functions. - llvm::DenseMap> - MergedLookups; - typedef llvm::DenseMap > KeyDeclsMap; diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 0585234f15..b59b94f9bf 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -1519,15 +1519,6 @@ void ASTDeclReader::MergeDefinitionData( auto &DD = *D->DefinitionData.getNotUpdated(); if (DD.Definition != MergeDD.Definition) { - // If the new definition has new special members, let the name lookup - // code know that it needs to look in the new definition too. - // - // FIXME: We only need to do this if the merged definition declares members - // that this definition did not declare, or if it defines members that this - // definition did not define. - Reader.MergedLookups[DD.Definition].push_back(MergeDD.Definition); - DD.Definition->setHasExternalVisibleStorage(); - // Track that we merged the definitions. Reader.MergedDeclContexts.insert(std::make_pair(MergeDD.Definition, DD.Definition)); @@ -3731,17 +3722,6 @@ void ASTDeclReader::UpdateDecl(Decl *D, ModuleFile &ModuleFile, // FIXME: We should call addHiddenDecl instead, to add the member // to its DeclContext. RD->addedMember(MD); - - // If we've added a new special member to a class definition that is not - // the canonical definition, then we need special member lookups in the - // canonical definition to also look into our class. - auto *DD = RD->DefinitionData.getNotUpdated(); - if (DD && DD->Definition != RD) { - auto &Merged = Reader.MergedLookups[DD->Definition]; - // FIXME: Avoid the linear-time scan here. - if (std::find(Merged.begin(), Merged.end(), RD) == Merged.end()) - Merged.push_back(RD); - } break; }