File tree 2 files changed +0
-23
lines changed
2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -2211,10 +2211,6 @@ class ConstraintSystem {
2211
2211
2212
2212
llvm::SetVector<TypeVariableType *> TypeVariables;
2213
2213
2214
- // / Maps expressions to types for choosing a favored overload
2215
- // / type in a disjunction constraint.
2216
- llvm::DenseMap<Expr *, TypeBase *> FavoredTypes;
2217
-
2218
2214
// / Maps discovered closures to their types inferred
2219
2215
// / from declared parameters/result and body.
2220
2216
// /
@@ -2955,15 +2951,6 @@ class ConstraintSystem {
2955
2951
return nullptr ;
2956
2952
}
2957
2953
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
-
2967
2954
// / Set the type in our type map for the given node, and record the change
2968
2955
// / in the trail.
2969
2956
// /
Original file line number Diff line number Diff line change @@ -403,7 +403,6 @@ namespace {
403
403
Type fixedOutputType =
404
404
CS.getFixedTypeRecursive (outputTy, /* wantRValue=*/ false );
405
405
if (!fixedOutputType->isTypeVariableOrMember ()) {
406
- CS.setFavoredType (anchor, fixedOutputType.getPointer ());
407
406
outputTy = fixedOutputType;
408
407
}
409
408
@@ -807,11 +806,6 @@ namespace {
807
806
return eltType;
808
807
}
809
808
}
810
-
811
- if (!knownType->hasPlaceholder ()) {
812
- // Set the favored type for this expression to the known type.
813
- CS.setFavoredType (E, knownType.getPointer ());
814
- }
815
809
}
816
810
}
817
811
@@ -1290,9 +1284,6 @@ namespace {
1290
1284
CS.getASTContext ());
1291
1285
}
1292
1286
1293
- if (auto favoredTy = CS.getFavoredType (expr->getSubExpr ())) {
1294
- CS.setFavoredType (expr, favoredTy);
1295
- }
1296
1287
return CS.getType (expr->getSubExpr ());
1297
1288
}
1298
1289
@@ -2567,7 +2558,6 @@ namespace {
2567
2558
Type fixedType =
2568
2559
CS.getFixedTypeRecursive (resultType, /* wantRvalue=*/ true );
2569
2560
if (!fixedType->isTypeVariableOrMember ()) {
2570
- CS.setFavoredType (expr, fixedType.getPointer ());
2571
2561
resultType = fixedType;
2572
2562
}
2573
2563
You can’t perform that action at this time.
0 commit comments