File tree Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -2211,10 +2211,6 @@ class ConstraintSystem {
22112211
22122212 llvm::SetVector<TypeVariableType *> TypeVariables;
22132213
2214- // / Maps expressions to types for choosing a favored overload
2215- // / type in a disjunction constraint.
2216- llvm::DenseMap<Expr *, TypeBase *> FavoredTypes;
2217-
22182214 // / Maps discovered closures to their types inferred
22192215 // / from declared parameters/result and body.
22202216 // /
@@ -2955,15 +2951,6 @@ class ConstraintSystem {
29552951 return nullptr ;
29562952 }
29572953
2958- TypeBase* getFavoredType (Expr *E) {
2959- assert (E != nullptr );
2960- return this ->FavoredTypes [E];
2961- }
2962- void setFavoredType (Expr *E, TypeBase *T) {
2963- assert (E != nullptr );
2964- this ->FavoredTypes [E] = T;
2965- }
2966-
29672954 // / Set the type in our type map for the given node, and record the change
29682955 // / in the trail.
29692956 // /
Original file line number Diff line number Diff line change @@ -403,7 +403,6 @@ namespace {
403403 Type fixedOutputType =
404404 CS.getFixedTypeRecursive (outputTy, /* wantRValue=*/ false );
405405 if (!fixedOutputType->isTypeVariableOrMember ()) {
406- CS.setFavoredType (anchor, fixedOutputType.getPointer ());
407406 outputTy = fixedOutputType;
408407 }
409408
@@ -807,11 +806,6 @@ namespace {
807806 return eltType;
808807 }
809808 }
810-
811- if (!knownType->hasPlaceholder ()) {
812- // Set the favored type for this expression to the known type.
813- CS.setFavoredType (E, knownType.getPointer ());
814- }
815809 }
816810 }
817811
@@ -1290,9 +1284,6 @@ namespace {
12901284 CS.getASTContext ());
12911285 }
12921286
1293- if (auto favoredTy = CS.getFavoredType (expr->getSubExpr ())) {
1294- CS.setFavoredType (expr, favoredTy);
1295- }
12961287 return CS.getType (expr->getSubExpr ());
12971288 }
12981289
@@ -2567,7 +2558,6 @@ namespace {
25672558 Type fixedType =
25682559 CS.getFixedTypeRecursive (resultType, /* wantRvalue=*/ true );
25692560 if (!fixedType->isTypeVariableOrMember ()) {
2570- CS.setFavoredType (expr, fixedType.getPointer ());
25712561 resultType = fixedType;
25722562 }
25732563
You can’t perform that action at this time.
0 commit comments