Skip to content

Commit 9e12b37

Browse files
committed
Dump component types of SILFunctionType
1 parent e86558f commit 9e12b37

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3654,8 +3654,26 @@ namespace {
36543654

36553655
void visitSILFunctionType(SILFunctionType *T, StringRef label) {
36563656
printCommon(label, "sil_function_type");
3657-
// FIXME: Print the structure of the type.
36583657
printField("type", T->getString());
3658+
3659+
for (auto param : T->getParameters()) {
3660+
printRec("input", param.getInterfaceType());
3661+
}
3662+
for (auto yield : T->getYields()) {
3663+
printRec("yield", yield.getInterfaceType());
3664+
}
3665+
for (auto result : T->getResults()) {
3666+
printRec("result", result.getInterfaceType());
3667+
}
3668+
if (auto error = T->getOptionalErrorResult()) {
3669+
printRec("error", error->getInterfaceType());
3670+
}
3671+
OS << '\n';
3672+
T->getPatternSubstitutions().dump(OS, SubstitutionMap::DumpStyle::Full,
3673+
Indent+2);
3674+
OS << '\n';
3675+
T->getInvocationSubstitutions().dump(OS, SubstitutionMap::DumpStyle::Full,
3676+
Indent+2);
36593677
PrintWithColorRAII(OS, ParenthesisColor) << ')';
36603678
}
36613679

0 commit comments

Comments
 (0)