Skip to content

Commit 4d531ae

Browse files
committed
RequirementMachine: Remove PropertyMap::ConcreteConformances
1 parent 1e731d3 commit 4d531ae

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

lib/AST/RequirementMachine/ConcreteTypeWitness.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ void PropertyMap::concretizeNestedTypesFromConcreteParent(
132132
//
133133
// This occurs when a pair of rules are inherited from the property map
134134
// entry for this key's suffix.
135-
auto pair = std::make_pair(concreteRuleID, conformanceRuleID);
136-
auto found = ConcreteConformances.find(pair);
137-
if (found != ConcreteConformances.end())
135+
if (!checkRulePairOnce(concreteRuleID, conformanceRuleID))
138136
continue;
139137

140138
// FIXME: Either remove the ModuleDecl entirely from conformance lookup,
@@ -168,13 +166,6 @@ void PropertyMap::concretizeNestedTypesFromConcreteParent(
168166
// opaque result type?
169167
assert(!conformance.isAbstract());
170168

171-
// Save this conformance for later.
172-
auto *concrete = conformance.getConcrete();
173-
auto inserted = ConcreteConformances.insert(
174-
std::make_pair(pair, concrete));
175-
assert(inserted.second);
176-
(void) inserted;
177-
178169
auto concreteConformanceSymbol = Symbol::forConcreteConformance(
179170
concreteType, substitutions, proto, Context);
180171

lib/AST/RequirementMachine/PropertyMap.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,6 @@ class PropertyMap {
174174
// To avoid wasted work from re-introducing the same induced rules,
175175
// we track the rules we've seen already on previous builds.
176176

177-
/// Maps a pair of rules where the first is a conformance rule and the
178-
/// second is a superclass or concrete type rule, to a concrete
179-
/// conformance.
180-
llvm::DenseMap<std::pair<unsigned, unsigned>, ProtocolConformance *>
181-
ConcreteConformances;
182-
183177
/// Superclass requirements always imply a layout requirement, and
184178
/// concrete type requirements where the type is a class imply a
185179
/// superclass requirement.

0 commit comments

Comments
 (0)