@@ -4167,18 +4167,34 @@ namespace {
4167
4167
printCommon (#Name, label); \
4168
4168
\
4169
4169
printFieldQuoted (T->getDecl ()->printRef (), " decl" ); \
4170
+ printFlag (T->getDecl ()->hasClangNode (), " foreign" ); \
4170
4171
\
4171
4172
if (T->getParent ()) \
4172
4173
printRec (T->getParent (), " parent" ); \
4173
4174
\
4174
4175
printFoot (); \
4175
4176
}
4176
4177
4177
- VISIT_NOMINAL_TYPE (EnumType, enum_type)
4178
- VISIT_NOMINAL_TYPE (StructType, struct_type)
4179
- VISIT_NOMINAL_TYPE (ClassType, class_type)
4178
+ #define VISIT_BINDABLE_NOMINAL_TYPE (TypeClass, Name ) \
4179
+ VISIT_NOMINAL_TYPE (TypeClass, Name) \
4180
+ void visitBoundGeneric##TypeClass( \
4181
+ BoundGeneric##TypeClass *T, StringRef label) { \
4182
+ printCommon (" bound_generic_" #Name, label); \
4183
+ printFieldQuoted (T->getDecl ()->printRef (), " decl" ); \
4184
+ printFlag (T->getDecl ()->hasClangNode (), " foreign" ); \
4185
+ if (T->getParent ()) \
4186
+ printRec (T->getParent (), " parent" ); \
4187
+ for (auto arg : T->getGenericArgs ()) \
4188
+ printRec (arg); \
4189
+ printFoot (); \
4190
+ }
4191
+
4192
+ VISIT_BINDABLE_NOMINAL_TYPE (EnumType, enum_type)
4193
+ VISIT_BINDABLE_NOMINAL_TYPE (StructType, struct_type)
4194
+ VISIT_BINDABLE_NOMINAL_TYPE (ClassType, class_type)
4180
4195
VISIT_NOMINAL_TYPE (ProtocolType, protocol_type)
4181
4196
4197
+ #undef VISIT_BINDABLE_NOMINAL_TYPE
4182
4198
#undef VISIT_NOMINAL_TYPE
4183
4199
4184
4200
void visitBuiltinTupleType (BuiltinTupleType *T, StringRef label) {
@@ -4213,6 +4229,7 @@ namespace {
4213
4229
void visitModuleType (ModuleType *T, StringRef label) {
4214
4230
printCommon (" module_type" , label);
4215
4231
printDeclNameField (T->getModule (), " module" );
4232
+ printFlag (T->getModule ()->isNonSwiftModule (), " foreign" );
4216
4233
printFoot ();
4217
4234
}
4218
4235
@@ -4330,7 +4347,7 @@ namespace {
4330
4347
void printAnyFunctionParamsRec (ArrayRef<AnyFunctionType::Param> params,
4331
4348
StringRef label) {
4332
4349
printRecArbitrary ([&](StringRef label) {
4333
- printCommon (" function_params" , label);
4350
+ printHead (" function_params" , FieldLabelColor , label);
4334
4351
4335
4352
printField (params.size (), " num_params" );
4336
4353
for (const auto ¶m : params) {
@@ -4541,37 +4558,6 @@ namespace {
4541
4558
printFoot ();
4542
4559
}
4543
4560
4544
- void visitBoundGenericClassType (BoundGenericClassType *T, StringRef label) {
4545
- printCommon (" bound_generic_class_type" , label);
4546
- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
4547
- if (T->getParent ())
4548
- printRec (T->getParent (), " parent" );
4549
- for (auto arg : T->getGenericArgs ())
4550
- printRec (arg);
4551
- printFoot ();
4552
- }
4553
-
4554
- void visitBoundGenericStructType (BoundGenericStructType *T,
4555
- StringRef label) {
4556
- printCommon (" bound_generic_struct_type" , label);
4557
- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
4558
- if (T->getParent ())
4559
- printRec (T->getParent (), " parent" );
4560
- for (auto arg : T->getGenericArgs ())
4561
- printRec (arg);
4562
- printFoot ();
4563
- }
4564
-
4565
- void visitBoundGenericEnumType (BoundGenericEnumType *T, StringRef label) {
4566
- printCommon (" bound_generic_enum_type" , label);
4567
- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
4568
- if (T->getParent ())
4569
- printRec (T->getParent (), " parent" );
4570
- for (auto arg : T->getGenericArgs ())
4571
- printRec (arg);
4572
- printFoot ();
4573
- }
4574
-
4575
4561
void visitTypeVariableType (TypeVariableType *T, StringRef label) {
4576
4562
printCommon (" type_variable_type" , label);
4577
4563
printField (T->getID (), " id" );
0 commit comments