@@ -4883,18 +4883,34 @@ namespace {
48834883 printCommon (#Name, label); \
48844884 \
48854885 printFieldQuoted (T->getDecl ()->printRef (), " decl" ); \
4886+ printFlag (T->getDecl ()->hasClangNode (), " foreign" ); \
48864887 \
48874888 if (T->getParent ()) \
48884889 printRec (T->getParent (), " parent" ); \
48894890 \
48904891 printFoot (); \
48914892 }
48924893
4893- VISIT_NOMINAL_TYPE (EnumType, enum_type)
4894- VISIT_NOMINAL_TYPE (StructType, struct_type)
4895- VISIT_NOMINAL_TYPE (ClassType, class_type)
4894+ #define VISIT_BINDABLE_NOMINAL_TYPE (TypeClass, Name ) \
4895+ VISIT_NOMINAL_TYPE (TypeClass, Name) \
4896+ void visitBoundGeneric##TypeClass( \
4897+ BoundGeneric##TypeClass *T, StringRef label) { \
4898+ printCommon (" bound_generic_" #Name, label); \
4899+ printFieldQuoted (T->getDecl ()->printRef (), " decl" ); \
4900+ printFlag (T->getDecl ()->hasClangNode (), " foreign" ); \
4901+ if (T->getParent ()) \
4902+ printRec (T->getParent (), " parent" ); \
4903+ for (auto arg : T->getGenericArgs ()) \
4904+ printRec (arg); \
4905+ printFoot (); \
4906+ }
4907+
4908+ VISIT_BINDABLE_NOMINAL_TYPE (EnumType, enum_type)
4909+ VISIT_BINDABLE_NOMINAL_TYPE (StructType, struct_type)
4910+ VISIT_BINDABLE_NOMINAL_TYPE (ClassType, class_type)
48964911 VISIT_NOMINAL_TYPE (ProtocolType, protocol_type)
48974912
4913+ #undef VISIT_BINDABLE_NOMINAL_TYPE
48984914#undef VISIT_NOMINAL_TYPE
48994915
49004916 void visitBuiltinTupleType (BuiltinTupleType *T, StringRef label) {
@@ -4929,6 +4945,7 @@ namespace {
49294945 void visitModuleType (ModuleType *T, StringRef label) {
49304946 printCommon (" module_type" , label);
49314947 printDeclNameField (T->getModule (), " module" );
4948+ printFlag (T->getModule ()->isNonSwiftModule (), " foreign" );
49324949 printFoot ();
49334950 }
49344951
@@ -5046,7 +5063,7 @@ namespace {
50465063 void printAnyFunctionParamsRec (ArrayRef<AnyFunctionType::Param> params,
50475064 StringRef label) {
50485065 printRecArbitrary ([&](StringRef label) {
5049- printCommon (" function_params" , label);
5066+ printHead (" function_params" , FieldLabelColor , label);
50505067
50515068 printField (params.size (), " num_params" );
50525069 for (const auto ¶m : params) {
@@ -5257,37 +5274,6 @@ namespace {
52575274 printFoot ();
52585275 }
52595276
5260- void visitBoundGenericClassType (BoundGenericClassType *T, StringRef label) {
5261- printCommon (" bound_generic_class_type" , label);
5262- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
5263- if (T->getParent ())
5264- printRec (T->getParent (), " parent" );
5265- for (auto arg : T->getGenericArgs ())
5266- printRec (arg);
5267- printFoot ();
5268- }
5269-
5270- void visitBoundGenericStructType (BoundGenericStructType *T,
5271- StringRef label) {
5272- printCommon (" bound_generic_struct_type" , label);
5273- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
5274- if (T->getParent ())
5275- printRec (T->getParent (), " parent" );
5276- for (auto arg : T->getGenericArgs ())
5277- printRec (arg);
5278- printFoot ();
5279- }
5280-
5281- void visitBoundGenericEnumType (BoundGenericEnumType *T, StringRef label) {
5282- printCommon (" bound_generic_enum_type" , label);
5283- printFieldQuoted (T->getDecl ()->printRef (), " decl" );
5284- if (T->getParent ())
5285- printRec (T->getParent (), " parent" );
5286- for (auto arg : T->getGenericArgs ())
5287- printRec (arg);
5288- printFoot ();
5289- }
5290-
52915277 void visitTypeVariableType (TypeVariableType *T, StringRef label) {
52925278 printCommon (" type_variable_type" , label);
52935279 printField (T->getID (), " id" );
0 commit comments