File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -1056,17 +1056,12 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
10561056 printDebugVar (ABI->getVarInfo ());
10571057 }
10581058
1059- void printSubstitutions (SubstitutionMap Subs,
1060- GenericSignature *Sig = nullptr ) {
1061- if (!Subs.hasAnySubstitutableParams ()) return ;
1062-
1063- // FIXME: This is a hack to cope with cases where the substitution map uses
1064- // a generic signature that's close-to-but-not-the-same-as expected.
1065- auto genericSig = Sig ? Sig : Subs.getGenericSignature ();
1059+ void printSubstitutions (SubstitutionMap Subs) {
1060+ if (Subs.empty ()) return ;
10661061
10671062 *this << ' <' ;
10681063 bool first = true ;
1069- for (auto gp : genericSig ->getGenericParams ()) {
1064+ for (auto gp : Subs. getGenericSignature () ->getGenericParams ()) {
10701065 if (first) first = false ;
10711066 else *this << " , " ;
10721067
@@ -1078,8 +1073,7 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
10781073 template <class Inst >
10791074 void visitApplyInstBase (Inst *AI) {
10801075 *this << Ctx.getID (AI->getCallee ());
1081- printSubstitutions (AI->getSubstitutionMap (),
1082- AI->getOrigCalleeType ()->getGenericSignature ());
1076+ printSubstitutions (AI->getSubstitutionMap ());
10831077 *this << ' (' ;
10841078 interleave (AI->getArguments (),
10851079 [&](const SILValue &arg) { *this << Ctx.getID (arg); },
You can’t perform that action at this time.
0 commit comments