@@ -2157,37 +2157,40 @@ void EquivalenceClass::dump(llvm::raw_ostream &out,
2157
2157
}, [&]() {
2158
2158
out << " , " ;
2159
2159
});
2160
- out << " \n Conformances:" ;
2161
- interleave (conformsTo,
2162
- [&](const std::pair<
2163
- ProtocolDecl *,
2164
- std::vector<Constraint<ProtocolDecl *>>> &entry) {
2165
- out << entry.first ->getNameStr ();
2166
- },
2167
- [&] { out << " , " ; });
2168
- out << " \n Same-type constraints:" ;
2169
- llvm::interleave (
2170
- sameTypeConstraints,
2171
- [&](const Constraint<Type> &constraint) {
2172
- out << " \n " << constraint.getSubjectDependentType ({})
2173
- << " == " << constraint.value ;
2160
+ out << " \n " ;
2161
+ out << " Conformance constraints:\n " ;
2162
+ for (auto entry : conformsTo) {
2163
+ out << " " << entry.first ->getNameStr () << " \n " ;
2164
+ for (auto constraint : entry.second ) {
2165
+ constraint.source ->dump (out, &builder->getASTContext ().SourceMgr , 4 );
2166
+ if (constraint.source ->isDerivedRequirement ())
2167
+ out << " [derived]" ;
2168
+ out << " \n " ;
2169
+ }
2170
+ }
2171
+
2172
+ out << " Same-type constraints:\n " ;
2173
+ for (auto constraint : sameTypeConstraints) {
2174
+ out << " " << constraint.getSubjectDependentType ({})
2175
+ << " == " << constraint.value << " \n " ;
2176
+ constraint.source ->dump (out, &builder->getASTContext ().SourceMgr , 4 );
2177
+ if (constraint.source ->isDerivedRequirement ())
2178
+ out << " [derived]" ;
2179
+ out << " \n " ;
2180
+ }
2174
2181
2175
- if (constraint.source ->isDerivedRequirement ())
2176
- out << " [derived]" ;
2177
- },
2178
- [&] { out << " , " ; });
2179
2182
if (concreteType)
2180
- out << " \n Concrete type: " << concreteType.getString ();
2183
+ out << " Concrete type: " << concreteType.getString () << " \n " ;
2181
2184
if (superclass)
2182
- out << " \n Superclass : " << superclass.getString ();
2185
+ out << " Superclass : " << superclass.getString () << " \n " ;
2183
2186
if (layout)
2184
- out << " \n Layout : " << layout.getString ();
2187
+ out << " Layout : " << layout.getString () << " \n " ;
2185
2188
2186
2189
if (!delayedRequirements.empty ()) {
2187
- out << " \n Delayed requirements:" ;
2190
+ out << " Delayed requirements:\n " ;
2188
2191
for (const auto &req : delayedRequirements) {
2189
- out << " \n " ;
2190
2192
req.dump (out);
2193
+ out << " \n " ;
2191
2194
}
2192
2195
}
2193
2196
0 commit comments