@@ -1255,13 +1255,19 @@ namespace {
1255
1255
1256
1256
// / Print a substitution map as a child node.
1257
1257
void printRec (SubstitutionMap map, Label label) {
1258
+ printRec (map, SubstitutionMap::DumpStyle::Full, label);
1259
+ }
1260
+
1261
+ // / Print a substitution map as a child node.
1262
+ void printRec (SubstitutionMap map, SubstitutionMap::DumpStyle style,
1263
+ Label label) {
1258
1264
SmallPtrSet<const ProtocolConformance *, 4 > Dumped;
1259
- printRec (map, Dumped, label);
1265
+ printRec (map, style, Dumped, label);
1260
1266
}
1261
1267
1262
1268
// / Print a substitution map as a child node.
1263
- void printRec (SubstitutionMap map, VisitedConformances &visited ,
1264
- Label label);
1269
+ void printRec (SubstitutionMap map, SubstitutionMap::DumpStyle style ,
1270
+ VisitedConformances &visited, Label label);
1265
1271
1266
1272
// / Print a substitution map as a child node.
1267
1273
void printRec (const ProtocolConformanceRef &conf,
@@ -5807,7 +5813,8 @@ class PrintConformance : public PrintBase {
5807
5813
if (!shouldPrintDetails)
5808
5814
break ;
5809
5815
5810
- printRec (conf->getSubstitutionMap (), visited,
5816
+ printRec (conf->getSubstitutionMap (),
5817
+ SubstitutionMap::DumpStyle::Full, visited,
5811
5818
Label::optional (" substitutions" ));
5812
5819
if (auto condReqs = conf->getConditionalRequirementsIfAvailableOrCached (/* computeIfPossible=*/ false )) {
5813
5820
printList (*condReqs, [&](auto subReq, Label label) {
@@ -5906,7 +5913,7 @@ class PrintConformance : public PrintBase {
5906
5913
5907
5914
// A minimal dump doesn't need the details about the conformances, a lot of
5908
5915
// that info can be inferred from the signature.
5909
- if (style == SubstitutionMap::DumpStyle::Minimal )
5916
+ if (style != SubstitutionMap::DumpStyle::Full )
5910
5917
return ;
5911
5918
5912
5919
auto conformances = map.getConformances ();
@@ -5925,13 +5932,12 @@ class PrintConformance : public PrintBase {
5925
5932
}
5926
5933
};
5927
5934
5928
- void PrintBase::printRec (SubstitutionMap map, VisitedConformances &visited ,
5929
- Label label) {
5935
+ void PrintBase::printRec (SubstitutionMap map, SubstitutionMap::DumpStyle style ,
5936
+ VisitedConformances &visited, Label label) {
5930
5937
printRecArbitrary (
5931
5938
[&](Label label) {
5932
5939
PrintConformance (Writer, MemberLoading)
5933
- .visitSubstitutionMap (map, SubstitutionMap::DumpStyle::Full,
5934
- visited, label);
5940
+ .visitSubstitutionMap (map, style, visited, label);
5935
5941
},
5936
5942
label);
5937
5943
}
@@ -6354,7 +6360,9 @@ namespace {
6354
6360
6355
6361
printArchetypeCommonRec (T);
6356
6362
if (!T->getSubstitutions ().empty ()) {
6357
- printRec (T->getSubstitutions (), Label::optional (" substitutions" ));
6363
+ printRec (T->getSubstitutions (),
6364
+ SubstitutionMap::DumpStyle::NoConformances,
6365
+ Label::optional (" substitutions" ));
6358
6366
}
6359
6367
6360
6368
printFoot ();
0 commit comments