Skip to content

Commit a172ef4

Browse files
committed
[NFC] ConstrainSystem::getComputedBindings() is dead. Kill it.
(cherry picked from commit 87a5e4d)
1 parent 6f165cc commit a172ef4

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,21 +1011,6 @@ static PotentialBindings getPotentialBindings(ConstraintSystem &cs,
10111011
return result;
10121012
}
10131013

1014-
void ConstraintSystem::getComputedBindings(TypeVariableType *tvt,
1015-
SmallVectorImpl<Type> &bindings) {
1016-
// If the type variable is fixed, look no further.
1017-
if (auto fixedType = tvt->getImpl().getFixedType(nullptr)) {
1018-
bindings.push_back(fixedType);
1019-
return;
1020-
}
1021-
1022-
PotentialBindings potentialBindings = getPotentialBindings(*this, tvt);
1023-
1024-
for (auto binding : potentialBindings.Bindings) {
1025-
bindings.push_back(binding.BindingType);
1026-
}
1027-
}
1028-
10291014
/// \brief Try each of the given type variable bindings to find solutions
10301015
/// to the given constraint system.
10311016
///

lib/Sema/ConstraintSystem.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,11 +2070,6 @@ class ConstraintSystem {
20702070
Expr *applySolutionShallow(const Solution &solution, Expr *expr,
20712071
bool suppressDiagnostics);
20722072

2073-
/// \brief Obtain the specializations computed for a type variable. This is
2074-
/// useful when emitting diagnostics for computed type variables.
2075-
void getComputedBindings(TypeVariableType *tvt,
2076-
SmallVectorImpl<Type> &bindings);
2077-
20782073
/// Extract the base type from an array or slice type.
20792074
/// \param type The array type to inspect.
20802075
/// \returns the base type of the array.

0 commit comments

Comments
 (0)