File tree Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -127,10 +127,6 @@ class ASTVisitor {
127
127
llvm_unreachable (" Not reachable, all cases handled" );
128
128
}
129
129
130
- TypeReprRetTy visitTypeRepr (TypeRepr *T, Args... AA) {
131
- return TypeReprRetTy ();
132
- }
133
-
134
130
#define TYPEREPR (CLASS, PARENT ) \
135
131
TypeReprRetTy visit##CLASS##TypeRepr(CLASS##TypeRepr *T, Args... AA) {\
136
132
return static_cast <ImplClass*>(this )->visit ##PARENT (T, \
Original file line number Diff line number Diff line change @@ -3003,6 +3003,31 @@ class PrintTypeRepr : public TypeReprVisitor<PrintTypeRepr> {
3003
3003
OS << " type=" ; Ty.dump (OS);
3004
3004
PrintWithColorRAII (OS, ParenthesisColor) << ' )' ;
3005
3005
}
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
+ }
3006
3031
};
3007
3032
3008
3033
} // end anonymous namespace
Original file line number Diff line number Diff line change @@ -3674,6 +3674,10 @@ class UnsupportedProtocolVisitor
3674
3674
return !checkStatements;
3675
3675
}
3676
3676
3677
+ void visitTypeRepr (TypeRepr *T) {
3678
+ // Do nothing for all TypeReprs except the ones listed below.
3679
+ }
3680
+
3677
3681
void visitIdentTypeRepr (IdentTypeRepr *T) {
3678
3682
if (T->isInvalid ())
3679
3683
return ;
You can’t perform that action at this time.
0 commit comments