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> {
1056
1056
printDebugVar (ABI->getVarInfo ());
1057
1057
}
1058
1058
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 ;
1066
1061
1067
1062
*this << ' <' ;
1068
1063
bool first = true ;
1069
- for (auto gp : genericSig ->getGenericParams ()) {
1064
+ for (auto gp : Subs. getGenericSignature () ->getGenericParams ()) {
1070
1065
if (first) first = false ;
1071
1066
else *this << " , " ;
1072
1067
@@ -1078,8 +1073,7 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
1078
1073
template <class Inst >
1079
1074
void visitApplyInstBase (Inst *AI) {
1080
1075
*this << Ctx.getID (AI->getCallee ());
1081
- printSubstitutions (AI->getSubstitutionMap (),
1082
- AI->getOrigCalleeType ()->getGenericSignature ());
1076
+ printSubstitutions (AI->getSubstitutionMap ());
1083
1077
*this << ' (' ;
1084
1078
interleave (AI->getArguments (),
1085
1079
[&](const SILValue &arg) { *this << Ctx.getID (arg); },
You can’t perform that action at this time.
0 commit comments