Skip to content

Commit a058d99

Browse files
committed
Added dumping for SILBoxTypeRepr
1 parent 1a32db9 commit a058d99

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3003,6 +3003,31 @@ class PrintTypeRepr : public TypeReprVisitor<PrintTypeRepr> {
30033003
OS << " type="; Ty.dump(OS);
30043004
PrintWithColorRAII(OS, ParenthesisColor) << ')';
30053005
}
3006+
3007+
void visitSILBoxTypeRepr(SILBoxTypeRepr *T) {
3008+
printCommon("sil_box");
3009+
Indent += 2;
3010+
3011+
ArrayRef<SILBoxTypeReprField> Fields = T->getFields();
3012+
for (unsigned i = 0, end = Fields.size(); i != end; ++i) {
3013+
OS << '\n';
3014+
printCommon("sil_box_field");
3015+
if (Fields[i].isMutable()) {
3016+
OS << " mutable";
3017+
}
3018+
OS << '\n';
3019+
printRec(Fields[i].getFieldType());
3020+
PrintWithColorRAII(OS, ParenthesisColor) << ')';
3021+
}
3022+
3023+
for (auto genArg : T->getGenericArguments()) {
3024+
OS << '\n';
3025+
printRec(genArg);
3026+
}
3027+
3028+
PrintWithColorRAII(OS, ParenthesisColor) << ')';
3029+
Indent -= 2;
3030+
}
30063031
};
30073032

30083033
} // end anonymous namespace

0 commit comments

Comments
 (0)