@@ -4883,18 +4883,34 @@ namespace {
4883
4883
printCommon (#Name, label); \
4884
4884
\
4885
4885
printFieldQuoted (T->getDecl ()->printRef (), " decl" ); \
4886
+ printFlag (T->getDecl ()->hasClangNode (), " foreign" ); \
4886
4887
\
4887
4888
if (T->getParent ()) \
4888
4889
printRec (T->getParent (), " parent" ); \
4889
4890
\
4890
4891
printFoot (); \
4891
4892
}
4892
4893
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)
4896
4911
VISIT_NOMINAL_TYPE (ProtocolType, protocol_type)
4897
4912
4913
+ #undef VISIT_BINDABLE_NOMINAL_TYPE
4898
4914
#undef VISIT_NOMINAL_TYPE
4899
4915
4900
4916
void visitBuiltinTupleType (BuiltinTupleType *T, StringRef label) {
@@ -4929,6 +4945,7 @@ namespace {
4929
4945
void visitModuleType (ModuleType *T, StringRef label) {
4930
4946
printCommon (" module_type" , label);
4931
4947
printDeclNameField (T->getModule (), " module" );
4948
+ printFlag (T->getModule ()->isNonSwiftModule (), " foreign" );
4932
4949
printFoot ();
4933
4950
}
4934
4951
@@ -5046,7 +5063,7 @@ namespace {
5046
5063
void printAnyFunctionParamsRec (ArrayRef<AnyFunctionType::Param> params,
5047
5064
StringRef label) {
5048
5065
printRecArbitrary ([&](StringRef label) {
5049
- printCommon (" function_params" , label);
5066
+ printHead (" function_params" , FieldLabelColor , label);
5050
5067
5051
5068
printField (params.size (), " num_params" );
5052
5069
for (const auto ¶m : params) {
@@ -5257,37 +5274,6 @@ namespace {
5257
5274
printFoot ();
5258
5275
}
5259
5276
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
-
5291
5277
void visitTypeVariableType (TypeVariableType *T, StringRef label) {
5292
5278
printCommon (" type_variable_type" , label);
5293
5279
printField (T->getID (), " id" );
0 commit comments