File tree Expand file tree Collapse file tree 3 files changed +2
-23
lines changed Expand file tree Collapse file tree 3 files changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -2131,9 +2131,7 @@ class SyntacticElementTargetRewriter {
21312131
21322132enum class ConstraintSystemPhase {
21332133 ConstraintGeneration,
2134- Solving,
2135- Diagnostics,
2136- Finalization
2134+ Solving
21372135};
21382136
21392137// / Retrieve the closure type from the constraint system.
@@ -2693,18 +2691,7 @@ class ConstraintSystem {
26932691 case ConstraintSystemPhase::Solving:
26942692 // We can come back to constraint generation phase while
26952693 // processing result builder body.
2696- assert (newPhase == ConstraintSystemPhase::ConstraintGeneration ||
2697- newPhase == ConstraintSystemPhase::Diagnostics ||
2698- newPhase == ConstraintSystemPhase::Finalization);
2699- break ;
2700-
2701- case ConstraintSystemPhase::Diagnostics:
2702- assert (newPhase == ConstraintSystemPhase::Solving ||
2703- newPhase == ConstraintSystemPhase::Finalization);
2704- break ;
2705-
2706- case ConstraintSystemPhase::Finalization:
2707- assert (newPhase == ConstraintSystemPhase::Diagnostics);
2694+ assert (newPhase == ConstraintSystemPhase::ConstraintGeneration);
27082695 break ;
27092696 }
27102697#endif
Original file line number Diff line number Diff line change @@ -1579,8 +1579,6 @@ void ConstraintSystem::solveImpl(SmallVectorImpl<Solution> &solutions) {
15791579
15801580 setPhase (ConstraintSystemPhase::Solving);
15811581
1582- SWIFT_DEFER { setPhase (ConstraintSystemPhase::Finalization); };
1583-
15841582 // If constraint system failed while trying to
15851583 // genenerate constraints, let's stop right here.
15861584 if (failedConstraint)
Original file line number Diff line number Diff line change @@ -2098,8 +2098,6 @@ SolutionResult ConstraintSystem::salvage() {
20982098 llvm::errs () << " ---Attempting to salvage and emit diagnostics---\n " ;
20992099 }
21002100
2101- setPhase (ConstraintSystemPhase::Diagnostics);
2102-
21032101 // Attempt to solve again, capturing all states that come from our attempts to
21042102 // select overloads or bind type variables.
21052103 //
@@ -4797,10 +4795,6 @@ void SyntacticElementTargetKey::dump(raw_ostream &OS) const {
47974795// / This is guaranteed to always emit an error message.
47984796// /
47994797void ConstraintSystem::diagnoseFailureFor (SyntacticElementTarget target) {
4800- setPhase (ConstraintSystemPhase::Diagnostics);
4801-
4802- SWIFT_DEFER { setPhase (ConstraintSystemPhase::Finalization); };
4803-
48044798 auto &DE = getASTContext ().Diags ;
48054799
48064800 // If constraint system is in invalid state always produce
You can’t perform that action at this time.
0 commit comments