File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,9 @@ StepResult ComponentStep::take(bool prevFailed) {
253
253
if (prevFailed || CS.getExpressionTooComplex (Solutions))
254
254
return done (/* isSuccess=*/ false );
255
255
256
+ // Setup active scope, only if previous component didn't fail.
257
+ setupScope ();
258
+
256
259
// / Try to figure out what this step is going to be,
257
260
// / after the scope has been established.
258
261
auto *disjunction = CS.selectDisjunction ();
Original file line number Diff line number Diff line change @@ -373,7 +373,18 @@ class ComponentStep final : public SolverStep {
373
373
OrphanedConstraint = constraint;
374
374
}
375
375
376
- void setup () override {
376
+ StepResult take (bool prevFailed) override ;
377
+ StepResult resume (bool prevFailed) override ;
378
+
379
+ // The number of disjunction constraints associated with this component.
380
+ unsigned disjunctionCount () const { return NumDisjunctions; }
381
+
382
+ void print (llvm::raw_ostream &Out) override {
383
+ Out << " ComponentStep with at #" << Index << ' \n ' ;
384
+ }
385
+
386
+ private:
387
+ void setupScope () {
377
388
// If this is a single component, there is no need
378
389
// to preliminary modify constraint system or log anything.
379
390
if (IsSingle)
@@ -387,16 +398,6 @@ class ComponentStep final : public SolverStep {
387
398
// let's return it ot the graph.
388
399
CS.CG .setOrphanedConstraint (OrphanedConstraint);
389
400
}
390
-
391
- StepResult take (bool prevFailed) override ;
392
- StepResult resume (bool prevFailed) override ;
393
-
394
- // The number of disjunction constraints associated with this component.
395
- unsigned disjunctionCount () const { return NumDisjunctions; }
396
-
397
- void print (llvm::raw_ostream &Out) override {
398
- Out << " ComponentStep with at #" << Index << ' \n ' ;
399
- }
400
401
};
401
402
402
403
template <typename P> class BindingStep : public SolverStep {
You can’t perform that action at this time.
0 commit comments