@@ -4870,18 +4870,34 @@ namespace {
4870
4870
printCommon (#Name, label); \
4871
4871
\
4872
4872
printFieldQuoted (T->getDecl ()->printRef (), " decl" ); \
4873
+ printFlag (T->getDecl ()->hasClangNode (), " foreign" ); \
4873
4874
\
4874
4875
if (T->getParent ()) \
4875
4876
printRec (T->getParent (), " parent" ); \
4876
4877
\
4877
4878
printFoot (); \
4878
4879
}
4879
4880
4880
- VISIT_NOMINAL_TYPE (EnumType, enum_type)
4881
- VISIT_NOMINAL_TYPE (StructType, struct_type)
4882
- VISIT_NOMINAL_TYPE (ClassType, class_type)
4881
+ #define VISIT_BINDABLE_NOMINAL_TYPE (TypeClass, Name ) \
4882
+ VISIT_NOMINAL_TYPE (TypeClass, Name) \
4883
+ void visitBoundGeneric##TypeClass( \
4884
+ BoundGeneric##TypeClass *T, StringRef label) { \
4885
+ printCommon (" bound_generic_" #Name, label); \
4886
+ printFieldQuoted (T->getDecl ()->printRef (), " decl" ); \
4887
+ printFlag (T->getDecl ()->hasClangNode (), " foreign" ); \
4888
+ if (T->getParent ()) \
4889
+ printRec (T->getParent (), " parent" ); \
4890
+ for (auto arg : T->getGenericArgs ()) \
4891
+ printRec (arg); \
4892
+ printFoot (); \
4893
+ }
4894
+
4895
+ VISIT_BINDABLE_NOMINAL_TYPE (EnumType, enum_type)
4896
+ VISIT_BINDABLE_NOMINAL_TYPE (StructType, struct_type)
4897
+ VISIT_BINDABLE_NOMINAL_TYPE (ClassType, class_type)
4883
4898
VISIT_NOMINAL_TYPE (ProtocolType, protocol_type)
4884
4899
4900
+ #undef VISIT_BINDABLE_NOMINAL_TYPE
4885
4901
#undef VISIT_NOMINAL_TYPE
4886
4902
4887
4903
void visitBuiltinTupleType (BuiltinTupleType *T, StringRef label) {
@@ -4916,6 +4932,7 @@ namespace {
4916
4932
void visitModuleType (ModuleType *T, StringRef label) {
4917
4933
printCommon (" module_type" , label);
4918
4934
printDeclNameField (T->getModule (), " module" );
4935
+ printFlag (T->getModule ()->isNonSwiftModule (), " foreign" );
4919
4936
printFoot ();
4920
4937
}
4921
4938
@@ -5033,7 +5050,7 @@ namespace {
5033
5050
void printAnyFunctionParamsRec (ArrayRef<AnyFunctionType::Param> params,
5034
5051
StringRef label) {
5035
5052
printRecArbitrary ([&](StringRef label) {
5036
- printCommon (" function_params" , label);
5053
+ printHead (" function_params" , FieldLabelColor , label);
5037
5054
5038
5055
printField (params.size (), " num_params" );
5039
5056
for (const auto ¶m : params) {
@@ -5244,37 +5261,6 @@ namespace {
5244
5261
printFoot ();
5245
5262
}
5246
5263
5247
- void visitBoundGenericClassType (BoundGenericClassType *T, StringRef label) {
5248
- printCommon (" bound_generic_class_type" , label);
5249
- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
5250
- if (T->getParent ())
5251
- printRec (T->getParent (), " parent" );
5252
- for (auto arg : T->getGenericArgs ())
5253
- printRec (arg);
5254
- printFoot ();
5255
- }
5256
-
5257
- void visitBoundGenericStructType (BoundGenericStructType *T,
5258
- StringRef label) {
5259
- printCommon (" bound_generic_struct_type" , label);
5260
- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
5261
- if (T->getParent ())
5262
- printRec (T->getParent (), " parent" );
5263
- for (auto arg : T->getGenericArgs ())
5264
- printRec (arg);
5265
- printFoot ();
5266
- }
5267
-
5268
- void visitBoundGenericEnumType (BoundGenericEnumType *T, StringRef label) {
5269
- printCommon (" bound_generic_enum_type" , label);
5270
- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
5271
- if (T->getParent ())
5272
- printRec (T->getParent (), " parent" );
5273
- for (auto arg : T->getGenericArgs ())
5274
- printRec (arg);
5275
- printFoot ();
5276
- }
5277
-
5278
5264
void visitTypeVariableType (TypeVariableType *T, StringRef label) {
5279
5265
printCommon (" type_variable_type" , label);
5280
5266
printField (T->getID (), " id" );
0 commit comments