File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -5033,6 +5033,9 @@ class ConstraintSystem {
5033
5033
// /
5034
5034
// / \returns The selected disjunction.
5035
5035
Constraint *selectDisjunction ();
5036
+ // / Select the best possible disjunction for solver to attempt
5037
+ // / based on the given list.
5038
+ Constraint *selectBestDisjunction (ArrayRef<Constraint *> disjunctions);
5036
5039
5037
5040
// / Pick a conjunction from the InactiveConstraints list.
5038
5041
// /
Original file line number Diff line number Diff line change @@ -1662,8 +1662,9 @@ ConstraintSystem::filterDisjunction(
1662
1662
// right-hand side of a conversion constraint, since having a concrete
1663
1663
// type that we're converting to can make it possible to split the
1664
1664
// constraint system into multiple ones.
1665
- static Constraint *selectBestBindingDisjunction (
1666
- ConstraintSystem &cs, SmallVectorImpl<Constraint *> &disjunctions) {
1665
+ static Constraint *
1666
+ selectBestBindingDisjunction (ConstraintSystem &cs,
1667
+ ArrayRef<Constraint *> disjunctions) {
1667
1668
1668
1669
if (disjunctions.empty ())
1669
1670
return nullptr ;
@@ -2170,6 +2171,13 @@ Constraint *ConstraintSystem::selectDisjunction() {
2170
2171
if (disjunctions.empty ())
2171
2172
return nullptr ;
2172
2173
2174
+ return selectBestDisjunction (disjunctions);
2175
+ }
2176
+
2177
+ Constraint *
2178
+ ConstraintSystem::selectBestDisjunction (ArrayRef<Constraint *> disjunctions) {
2179
+ assert (!disjunctions.empty ());
2180
+
2173
2181
if (auto *disjunction = selectBestBindingDisjunction (*this , disjunctions))
2174
2182
return disjunction;
2175
2183
You can’t perform that action at this time.
0 commit comments