Skip to content

Commit e6a1d83

Browse files
committed
[ast] Improve the debug dump for ActorIsolation.
Specifically, I made it so that when one calls dump(), we put in a newline afterwards so we get a nice easy to read msg in the debugger. I also defined dumpForDiagnostics() to make it easy to dump out in the debugger how the ActorIsolation will show up in the diagnostics.
1 parent e9cd2ae commit e6a1d83

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

include/swift/AST/ActorIsolation.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,15 @@ class ActorIsolation {
286286
void printForDiagnostics(llvm::raw_ostream &os,
287287
StringRef openingQuotationMark = "'") const;
288288

289-
SWIFT_DEBUG_DUMP { print(llvm::dbgs()); }
289+
SWIFT_DEBUG_DUMP {
290+
print(llvm::dbgs());
291+
llvm::dbgs() << '\n';
292+
}
293+
294+
SWIFT_DEBUG_DUMPER(dumpForDiagnostics()) {
295+
printForDiagnostics(llvm::dbgs());
296+
llvm::dbgs() << '\n';
297+
}
290298
};
291299

292300
/// Determine how the given value declaration is isolated.

0 commit comments

Comments
 (0)