Skip to content

Commit 1d6cb4f

Browse files
committed
[Constraint solver] Remove unused ConstraintSystem::getUnboundBindOverloads()
1 parent b83bb70 commit 1d6cb4f

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,38 +1713,6 @@ Constraint *ConstraintSystem::getUnboundBindOverloadDisjunction(
17131713
return nullptr;
17141714
}
17151715

1716-
/// solely resolved by an overload set.
1717-
SmallVector<OverloadChoice, 2> ConstraintSystem::getUnboundBindOverloads(
1718-
TypeVariableType *tyvar) {
1719-
// Always work on the representation.
1720-
tyvar = getRepresentative(tyvar);
1721-
1722-
SmallVector<OverloadChoice, 2> choices;
1723-
1724-
auto disjunction = getUnboundBindOverloadDisjunction(tyvar);
1725-
if (!disjunction) return choices;
1726-
1727-
for (auto constraint : disjunction->getNestedConstraints()) {
1728-
// We must have bind-overload constraints.
1729-
if (constraint->getKind() != ConstraintKind::BindOverload) {
1730-
choices.clear();
1731-
return choices;
1732-
}
1733-
1734-
// We must be binding the type variable (or a type variable equivalent to
1735-
// it).
1736-
auto boundTypeVar = constraint->getFirstType()->getAs<TypeVariableType>();
1737-
if (!boundTypeVar || getRepresentative(boundTypeVar) != tyvar) {
1738-
choices.clear();
1739-
return choices;
1740-
}
1741-
1742-
choices.push_back(constraint->getOverloadChoice());
1743-
}
1744-
1745-
return choices;
1746-
}
1747-
17481716
// Find a disjunction associated with an ApplicableFunction constraint
17491717
// where we have some information about all of the types of in the
17501718
// function application (even if we only know something about what the

lib/Sema/ConstraintSystem.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3176,14 +3176,6 @@ class ConstraintSystem {
31763176
unsigned *numOptionalUnwraps = nullptr);
31773177

31783178
private:
3179-
/// Given a type variable that might represent an overload set, retrieve
3180-
///
3181-
/// \returns the set of overload choices to which this type variable
3182-
/// could be bound, or an empty vector if the type variable is not
3183-
/// solely resolved by an overload set.
3184-
SmallVector<OverloadChoice, 2> getUnboundBindOverloads(
3185-
TypeVariableType *tyvar);
3186-
31873179
/// Solve the system of constraints after it has already been
31883180
/// simplified.
31893181
///

0 commit comments

Comments
 (0)