@@ -1357,15 +1357,12 @@ class TypeRefSubstitution
1357
1357
: public TypeRefVisitor<TypeRefSubstitution, const TypeRef *> {
1358
1358
TypeRefBuilder &Builder;
1359
1359
GenericArgumentMap Substitutions;
1360
- // Set true iff the Substitution map was actually used
1361
- bool DidSubstitute;
1360
+
1362
1361
public:
1363
1362
using TypeRefVisitor<TypeRefSubstitution, const TypeRef *>::visit;
1364
1363
1365
1364
TypeRefSubstitution (TypeRefBuilder &Builder, GenericArgumentMap Substitutions)
1366
- : Builder(Builder), Substitutions(Substitutions), DidSubstitute(false ) {}
1367
-
1368
- bool didSubstitute () const { return DidSubstitute; }
1365
+ : Builder(Builder), Substitutions(Substitutions) {}
1369
1366
1370
1367
const TypeRef *visitBuiltinTypeRef (const BuiltinTypeRef *B) {
1371
1368
return B;
@@ -1495,7 +1492,6 @@ class TypeRefSubstitution
1495
1492
if (found == Substitutions.end ())
1496
1493
return GTP;
1497
1494
assert (found->second ->isConcrete ());
1498
- DidSubstitute = true ; // We actually used the Substitutions
1499
1495
1500
1496
// When substituting a concrete type containing a metatype into a
1501
1497
// type parameter, (eg: T, T := C.Type), we must also represent
@@ -1616,15 +1612,6 @@ const TypeRef *TypeRef::subst(TypeRefBuilder &Builder,
1616
1612
return TypeRefSubstitution (Builder, Subs).visit (this );
1617
1613
}
1618
1614
1619
- const TypeRef *TypeRef::subst (TypeRefBuilder &Builder,
1620
- const GenericArgumentMap &Subs,
1621
- bool &DidSubstitute) const {
1622
- auto subst = TypeRefSubstitution (Builder, Subs);
1623
- auto TR = subst.visit (this );
1624
- DidSubstitute = subst.didSubstitute ();
1625
- return TR;
1626
- }
1627
-
1628
1615
bool TypeRef::deriveSubstitutions (GenericArgumentMap &Subs,
1629
1616
const TypeRef *OrigTR,
1630
1617
const TypeRef *SubstTR) {
0 commit comments