[CSGen] NFC: Remove obsolete ConstraintSystem::{get, set}FavoredType

This commit is contained in:
Pavel Yaskevich
2024-10-16 11:06:15 -07:00
parent 2fdd4b6c35
commit 8bd288447f
2 changed files with 0 additions and 23 deletions

View File

@@ -2211,10 +2211,6 @@ private:
llvm::SetVector<TypeVariableType *> TypeVariables;
/// Maps expressions to types for choosing a favored overload
/// type in a disjunction constraint.
llvm::DenseMap<Expr *, TypeBase *> FavoredTypes;
/// Maps discovered closures to their types inferred
/// from declared parameters/result and body.
///
@@ -2955,15 +2951,6 @@ public:
return nullptr;
}
TypeBase* getFavoredType(Expr *E) {
assert(E != nullptr);
return this->FavoredTypes[E];
}
void setFavoredType(Expr *E, TypeBase *T) {
assert(E != nullptr);
this->FavoredTypes[E] = T;
}
/// Set the type in our type map for the given node, and record the change
/// in the trail.
///

View File

@@ -403,7 +403,6 @@ namespace {
Type fixedOutputType =
CS.getFixedTypeRecursive(outputTy, /*wantRValue=*/false);
if (!fixedOutputType->isTypeVariableOrMember()) {
CS.setFavoredType(anchor, fixedOutputType.getPointer());
outputTy = fixedOutputType;
}
@@ -807,11 +806,6 @@ namespace {
return eltType;
}
}
if (!knownType->hasPlaceholder()) {
// Set the favored type for this expression to the known type.
CS.setFavoredType(E, knownType.getPointer());
}
}
}
@@ -1290,9 +1284,6 @@ namespace {
CS.getASTContext());
}
if (auto favoredTy = CS.getFavoredType(expr->getSubExpr())) {
CS.setFavoredType(expr, favoredTy);
}
return CS.getType(expr->getSubExpr());
}
@@ -2567,7 +2558,6 @@ namespace {
Type fixedType =
CS.getFixedTypeRecursive(resultType, /*wantRvalue=*/true);
if (!fixedType->isTypeVariableOrMember()) {
CS.setFavoredType(expr, fixedType.getPointer());
resultType = fixedType;
}