@@ -64,6 +64,14 @@ SolverTrail::~SolverTrail() {
6464 result.TheExpr = expr; \
6565 return result; \
6666 }
67+ #define CLOSURE_CHANGE (Name ) \
68+ SolverTrail::Change \
69+ SolverTrail::Change::Name (ClosureExpr *closure) { \
70+ Change result; \
71+ result.Kind = ChangeKind::Name; \
72+ result.TheClosure = closure; \
73+ return result; \
74+ }
6775#include " swift/Sema/CSTrail.def"
6876
6977SolverTrail::Change
@@ -247,14 +255,6 @@ SolverTrail::Change::RecordedResultBuilderTransform(AnyFunctionRef fn) {
247255 return result;
248256}
249257
250- SolverTrail::Change
251- SolverTrail::Change::RecordedClosureType (ClosureExpr *closure) {
252- Change result;
253- result.Kind = ChangeKind::RecordedClosureType;
254- result.TheClosure = closure;
255- return result;
256- }
257-
258258SolverTrail::Change
259259SolverTrail::Change::RecordedContextualInfo (ASTNode node) {
260260 Change result;
@@ -505,6 +505,10 @@ void SolverTrail::Change::undo(ConstraintSystem &cs) const {
505505 case ChangeKind::RecordedIsolatedParam:
506506 cs.removeIsolatedParam (TheParam);
507507 break ;
508+
509+ case ChangeKind::RecordedPreconcurrencyClosure:
510+ cs.removePreconcurrencyClosure (TheClosure);
511+ break ;
508512 }
509513}
510514
@@ -530,6 +534,12 @@ void SolverTrail::Change::dump(llvm::raw_ostream &out,
530534 simple_display (out, TheExpr); \
531535 out << " )\n " ; \
532536 break ;
537+ #define CLOSURE_CHANGE (Name ) \
538+ case ChangeKind::Name: \
539+ out << " (" << #Name << " " ; \
540+ simple_display (out, TheClosure); \
541+ out << " )\n " ; \
542+ break ;
533543#include " swift/Sema/CSTrail.def"
534544
535545 case ChangeKind::AddedTypeVariable:
@@ -693,12 +703,6 @@ void SolverTrail::Change::dump(llvm::raw_ostream &out,
693703 out << " )\n " ;
694704 break ;
695705
696- case ChangeKind::RecordedClosureType:
697- out << " (RecordedClosureType " ;
698- simple_display (out, TheClosure);
699- out << " )\n " ;
700- break ;
701-
702706 case ChangeKind::RecordedContextualInfo:
703707 // FIXME: Print short form of ASTNode
704708 out << " (RecordedContextualInfo)\n " ;
0 commit comments