Skip to content

Commit b9f5267

Browse files
committed
GSB: Stop printing enumerated requirements in dump()
The call to enumerateRequirements() here actually makes debugging more difficult, since it has a lot of side effects, for example calling maybeResolveEquivalenceClass() and removeSelfDerived(). Also, this is the only usage of enumerateRequirements() other than collectRequirements(), which allows the two to be merged together and simplified.
1 parent 34d3236 commit b9f5267

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7062,41 +7062,6 @@ void GenericSignatureBuilder::dump() {
70627062
}
70637063

70647064
void GenericSignatureBuilder::dump(llvm::raw_ostream &out) {
7065-
out << "Requirements:";
7066-
enumerateRequirements(getGenericParams(),
7067-
[&](RequirementKind kind,
7068-
Type type,
7069-
RequirementRHS constraint,
7070-
const RequirementSource *source) {
7071-
switch (kind) {
7072-
case RequirementKind::Conformance:
7073-
case RequirementKind::Superclass:
7074-
out << "\n ";
7075-
out << type.getString() << " : "
7076-
<< constraint.get<Type>().getString() << " [";
7077-
source->print(out, &Context.SourceMgr);
7078-
out << "]";
7079-
break;
7080-
case RequirementKind::Layout:
7081-
out << "\n ";
7082-
out << type.getString() << " : "
7083-
<< constraint.get<LayoutConstraint>().getString() << " [";
7084-
source->print(out, &Context.SourceMgr);
7085-
out << "]";
7086-
break;
7087-
case RequirementKind::SameType:
7088-
out << "\n ";
7089-
out << type.getString() << " == " ;
7090-
auto secondType = constraint.get<Type>();
7091-
out << secondType.getString();
7092-
out << " [";
7093-
source->print(out, &Context.SourceMgr);
7094-
out << "]";
7095-
break;
7096-
}
7097-
});
7098-
out << "\n";
7099-
71007065
out << "Potential archetypes:\n";
71017066
for (auto pa : Impl->PotentialArchetypes) {
71027067
pa->dump(out, &Context.SourceMgr, 2);

0 commit comments

Comments
 (0)