File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ StepResult DependentComponentSplitterStep::take(bool prevFailed) {
260
260
// "split" is considered a failure if previous step failed,
261
261
// or there is a failure recorded by constraint system, or
262
262
// system can't be simplified.
263
- if (prevFailed || CS.failedConstraint || CS.simplify ())
263
+ if (prevFailed || CS.getFailedConstraint () || CS.simplify ())
264
264
return done (/* isSuccess=*/ false );
265
265
266
266
// Figure out the sets of partial solutions that this component depends on.
Original file line number Diff line number Diff line change @@ -1613,8 +1613,6 @@ class ConstraintSystem {
1613
1613
1614
1614
class SolverScope ;
1615
1615
1616
- Constraint *failedConstraint = nullptr ;
1617
-
1618
1616
// / Expressions that are known to be unevaluated.
1619
1617
// / Note: this is only used to support ObjCSelectorExpr at the moment.
1620
1618
llvm::SmallPtrSet<Expr *, 2 > UnevaluatedRootExprs;
@@ -1623,6 +1621,10 @@ class ConstraintSystem {
1623
1621
unsigned CountDisjunctions = 0 ;
1624
1622
1625
1623
private:
1624
+ // / A constraint that has failed along the current solver path.
1625
+ // / Do not set directly, call \c recordFailedConstraint instead.
1626
+ Constraint *failedConstraint = nullptr ;
1627
+
1626
1628
// / Current phase of the constraint system lifetime.
1627
1629
ConstraintSystemPhase Phase = ConstraintSystemPhase::ConstraintGeneration;
1628
1630
@@ -2098,6 +2100,10 @@ class ConstraintSystem {
2098
2100
};
2099
2101
2100
2102
public:
2103
+ // / Retrieve the first constraint that has failed along the solver's path, or
2104
+ // / \c nullptr if no constraint has failed.
2105
+ Constraint *getFailedConstraint () const { return failedConstraint; }
2106
+
2101
2107
ConstraintSystemPhase getPhase () const { return Phase; }
2102
2108
2103
2109
// / Move constraint system to a new phase of its lifetime.
You can’t perform that action at this time.
0 commit comments