Skip to content

Commit ad503e9

Browse files
committed
[AST] Don't \n when dumping an abstract ProtocolConformanceRef as part of a larger dump.
1 parent 9d13361 commit ad503e9

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,6 @@ static void dumpProtocolConformanceRefRec(
28102810
out.indent(indent) << "(abstract_conformance protocol="
28112811
<< conformance.getAbstract()->getName();
28122812
PrintWithColorRAII(out, ParenthesisColor) << ')';
2813-
out << '\n';
28142813
}
28152814
}
28162815

@@ -2923,7 +2922,10 @@ static void dumpProtocolConformanceRec(
29232922
PrintWithColorRAII(out, ParenthesisColor) << ')';
29242923
}
29252924

2926-
void ProtocolConformanceRef::dump() const { dump(llvm::errs()); }
2925+
void ProtocolConformanceRef::dump() const {
2926+
dump(llvm::errs());
2927+
llvm::errs() << '\n';
2928+
}
29272929

29282930
void ProtocolConformanceRef::dump(llvm::raw_ostream &out,
29292931
unsigned indent) const {

test/Driver/debug-generic-signatures.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ class Super<T, U> {}
8181
// CHECK-NEXT: (assoc_type req=A type=Super<T, U>.A)
8282
// CHECK-NEXT: (assoc_type req=B type=Super<T, U>.B)
8383
// CHECK-NEXT: (abstract_conformance protocol=P2)
84-
// CHECK: (abstract_conformance protocol=P2)
85-
// CHECK: conforms_to: T P2
86-
// CHECK: conforms_to: U P2)
84+
// CHECK-NEXT: (abstract_conformance protocol=P2)
85+
// CHECK-NEXT: conforms_to: T P2
86+
// CHECK-NEXT: conforms_to: U P2)
8787
extension Super: P2 where T: P2, U: P2 {
8888
typealias A = T
8989
typealias B = T
@@ -114,7 +114,7 @@ extension Super: P2 where T: P2, U: P2 {
114114
// CHECK-NEXT: (assoc_type req=A type=Super<T, U>.A)
115115
// CHECK-NEXT: (assoc_type req=B type=Super<T, U>.B)
116116
// CHECK-NEXT: (abstract_conformance protocol=P2)
117-
// CHECK: (abstract_conformance protocol=P2)
118-
// CHECK: conforms_to: T P2
119-
// CHECK: conforms_to: U P2)))
117+
// CHECK-NEXT: (abstract_conformance protocol=P2)
118+
// CHECK-NEXT: conforms_to: T P2
119+
// CHECK-NEXT: conforms_to: U P2)))
120120
class Sub: Super<NonRecur, Recur> {}

0 commit comments

Comments
 (0)