Skip to content

Commit dd3e49c

Browse files
slavapestovxedin
authored andcommitted
Sema: Remove one-way constraint handling from computeConnectedComponents()
1 parent 385d66f commit dd3e49c

File tree

3 files changed

+8
-376
lines changed

3 files changed

+8
-376
lines changed

include/swift/Sema/Constraint.h

-5
Original file line numberDiff line numberDiff line change
@@ -820,11 +820,6 @@ class Constraint final : public llvm::ilist_node<Constraint>,
820820
/// from the rest of the constraint system.
821821
bool isIsolated() const { return IsIsolated; }
822822

823-
/// Whether this is a one-way constraint.
824-
bool isOneWayConstraint() const {
825-
return false;
826-
}
827-
828823
/// Retrieve the overload choice for an overload-binding constraint.
829824
OverloadChoice getOverloadChoice() const {
830825
assert(Kind == ConstraintKind::BindOverload);

lib/Sema/CSStep.cpp

-10
Original file line numberDiff line numberDiff line change
@@ -331,16 +331,6 @@ StepResult ComponentStep::take(bool prevFailed) {
331331
CS.replaySolution(*partial);
332332
}
333333

334-
// Activate all of the one-way constraints.
335-
SmallVector<Constraint *, 4> oneWayConstraints;
336-
for (auto &constraint : CS.InactiveConstraints) {
337-
if (constraint.isOneWayConstraint())
338-
oneWayConstraints.push_back(&constraint);
339-
}
340-
for (auto constraint : oneWayConstraints) {
341-
CS.activateConstraint(constraint);
342-
}
343-
344334
// Simplify again.
345335
if (CS.failedConstraint || CS.simplify())
346336
return done(/*isSuccess=*/false);

0 commit comments

Comments
 (0)