Skip to content

Commit 2caf2e0

Browse files
committed
Sema: Simplify ConstraintGraphNode::truncateEquivalenceClass()
1 parent 6652e34 commit 2caf2e0

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

lib/Sema/ConstraintGraph.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -276,26 +276,8 @@ void ConstraintGraphNode::addToEquivalenceClass(
276276
}
277277

278278
void ConstraintGraphNode::truncateEquivalenceClass(unsigned prevSize) {
279-
llvm::SmallSetVector<TypeVariableType *, 4> disconnectedVars;
280-
for (auto disconnected = EquivalenceClass.begin() + prevSize;
281-
disconnected != EquivalenceClass.end();
282-
++disconnected) {
283-
disconnectedVars.insert(*disconnected);
284-
}
285-
286279
EquivalenceClass.erase(EquivalenceClass.begin() + prevSize,
287280
EquivalenceClass.end());
288-
289-
// We need to re-introduce each constraint associated with
290-
// "disconnected" member itself and to this representative.
291-
{
292-
// Re-infer bindings for the current representative.
293-
resetBindingSet();
294-
295-
// Re-infer bindings all of the newly made representatives.
296-
for (auto *typeVar : disconnectedVars)
297-
CG[typeVar].notifyReferencingVars();
298-
}
299281
}
300282

301283
void ConstraintGraphNode::addReferencedVar(TypeVariableType *typeVar) {

0 commit comments

Comments
 (0)