r244277 - [modules] Remove now-unused MergedLookups map.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 14:09:45 PDT 2015
Author: rsmith
Date: Thu Aug 6 16:09:44 2015
New Revision: 244277
URL: http://llvm.org/viewvc/llvm-project?rev=244277&view=rev
Log:
[modules] Remove now-unused MergedLookups map.
Modified:
cfe/trunk/include/clang/Serialization/ASTReader.h
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
Modified: cfe/trunk/include/clang/Serialization/ASTReader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=244277&r1=244276&r2=244277&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTReader.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTReader.h Thu Aug 6 16:09:44 2015
@@ -977,13 +977,6 @@ private:
/// module is loaded.
SmallVector<ObjCInterfaceDecl *, 16> 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<const DeclContext*, SmallVector<const DeclContext*, 2>>
- MergedLookups;
-
typedef llvm::DenseMap<Decl *, SmallVector<serialization::DeclID, 2> >
KeyDeclsMap;
Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=244277&r1=244276&r2=244277&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Thu Aug 6 16:09:44 2015
@@ -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,
// 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;
}
More information about the cfe-commits
mailing list