Skip to content

Commit 6ccc2ac

Browse files
committed
[ConstraintSystem] Remove disjunction number as we're not currently
using it. It was added to use for selecting the order we visit disjunctions, but this order turned out to not be great (and I don't think there are simple variations on the creation order, like reverse order), that will work well either.
1 parent b8cb40b commit 6ccc2ac

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

lib/Sema/Constraint.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,6 @@ Constraint *Constraint::createDisjunction(ConstraintSystem &cs,
823823
auto disjunction = new (mem) Constraint(ConstraintKind::Disjunction,
824824
cs.allocateCopy(constraints), locator, typeVars);
825825
disjunction->RememberChoice = (bool) rememberChoice;
826-
cs.noteNewDisjunction(disjunction);
827826
return disjunction;
828827
}
829828

lib/Sema/ConstraintSystem.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -912,10 +912,6 @@ class ConstraintSystem {
912912
/// \brief The total number of disjunctions created.
913913
unsigned CountDisjunctions = 0;
914914

915-
/// \brief Map from disjunction to the number indicating the order it
916-
// was created in.
917-
llvm::DenseMap<Constraint *, unsigned> DisjunctionNumber;
918-
919915
private:
920916

921917
/// \brief Allocator used for all of the related constraint systems.
@@ -1895,11 +1891,6 @@ class ConstraintSystem {
18951891
bool allowFixes,
18961892
ConstraintLocatorBuilder locator);
18971893

1898-
void noteNewDisjunction(Constraint *constraint) {
1899-
assert(constraint->getKind() == ConstraintKind::Disjunction);
1900-
DisjunctionNumber[constraint] = CountDisjunctions++;
1901-
}
1902-
19031894
/// \brief Add a disjunction constraint.
19041895
void addDisjunctionConstraint(ArrayRef<Constraint *> constraints,
19051896
ConstraintLocatorBuilder locator,

0 commit comments

Comments
 (0)