Skip to content

Commit 917173c

Browse files
committed
Sema: Remove one-way constraint handling from computeConnectedComponents()
1 parent f07a16f commit 917173c

File tree

3 files changed

+8
-376
lines changed

3 files changed

+8
-376
lines changed

include/swift/Sema/Constraint.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -857,11 +857,6 @@ class Constraint final : public llvm::ilist_node<Constraint>,
857857
/// from the rest of the constraint system.
858858
bool isIsolated() const { return IsIsolated; }
859859

860-
/// Whether this is a one-way constraint.
861-
bool isOneWayConstraint() const {
862-
return false;
863-
}
864-
865860
/// Retrieve the overload choice for an overload-binding constraint.
866861
OverloadChoice getOverloadChoice() const {
867862
assert(Kind == ConstraintKind::BindOverload);

lib/Sema/CSStep.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,6 @@ StepResult ComponentStep::take(bool prevFailed) {
337337
CS.replaySolution(*partial);
338338
}
339339

340-
// Activate all of the one-way constraints.
341-
SmallVector<Constraint *, 4> oneWayConstraints;
342-
for (auto &constraint : CS.InactiveConstraints) {
343-
if (constraint.isOneWayConstraint())
344-
oneWayConstraints.push_back(&constraint);
345-
}
346-
for (auto constraint : oneWayConstraints) {
347-
CS.activateConstraint(constraint);
348-
}
349-
350340
// Simplify again.
351341
if (CS.failedConstraint || CS.simplify())
352342
return done(/*isSuccess=*/false);

0 commit comments

Comments
 (0)