@@ -1357,15 +1357,12 @@ class TypeRefSubstitution
13571357 : public TypeRefVisitor<TypeRefSubstitution, const TypeRef *> {
13581358 TypeRefBuilder &Builder;
13591359 GenericArgumentMap Substitutions;
1360- // Set true iff the Substitution map was actually used
1361- bool DidSubstitute;
1360+
13621361public:
13631362 using TypeRefVisitor<TypeRefSubstitution, const TypeRef *>::visit;
13641363
13651364 TypeRefSubstitution (TypeRefBuilder &Builder, GenericArgumentMap Substitutions)
1366- : Builder(Builder), Substitutions(Substitutions), DidSubstitute(false ) {}
1367-
1368- bool didSubstitute () const { return DidSubstitute; }
1365+ : Builder(Builder), Substitutions(Substitutions) {}
13691366
13701367 const TypeRef *visitBuiltinTypeRef (const BuiltinTypeRef *B) {
13711368 return B;
@@ -1495,7 +1492,6 @@ class TypeRefSubstitution
14951492 if (found == Substitutions.end ())
14961493 return GTP;
14971494 assert (found->second ->isConcrete ());
1498- DidSubstitute = true ; // We actually used the Substitutions
14991495
15001496 // When substituting a concrete type containing a metatype into a
15011497 // type parameter, (eg: T, T := C.Type), we must also represent
@@ -1616,15 +1612,6 @@ const TypeRef *TypeRef::subst(TypeRefBuilder &Builder,
16161612 return TypeRefSubstitution (Builder, Subs).visit (this );
16171613}
16181614
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-
16281615bool TypeRef::deriveSubstitutions (GenericArgumentMap &Subs,
16291616 const TypeRef *OrigTR,
16301617 const TypeRef *SubstTR) {
0 commit comments