Emit newline after IR-dump banner in PrintCallGraphPass (#199410)
Required for Compiler Explorer's opt-pipeline viewer: the tool parses pass output by splitting on the IR-dump banner line, so the banner must end with a newline. Without it, targets that exercise this pass cannot be inspected through the opt-pipeline feature. Assisted by Claude.
This commit is contained in:
parent
34f294ccbc
commit
7fb99eefbc
2 changed files with 12 additions and 1 deletions
|
|
@ -678,7 +678,7 @@ namespace {
|
|||
auto PrintBannerOnce = [&]() {
|
||||
if (BannerPrinted)
|
||||
return;
|
||||
OS << Banner;
|
||||
OS << Banner << "\n";
|
||||
BannerPrinted = true;
|
||||
};
|
||||
|
||||
|
|
|
|||
11
llvm/test/Other/legacy-callgraph-scc-pass-printer.ll
Normal file
11
llvm/test/Other/legacy-callgraph-scc-pass-printer.ll
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -enable-ipra \
|
||||
; RUN: -print-after=DummyCGSCCPass -o - %s 2>&1 | FileCheck %s
|
||||
; REQUIRES: x86-registered-target
|
||||
|
||||
; The legacy CallGraphSCCPass printer should emit the banner as its own line.
|
||||
; CHECK-LABEL: *** IR Dump After DummyCGSCCPass (DummyCGSCCPass) ***
|
||||
; CHECK-NEXT: define void @bar() {
|
||||
|
||||
define void @bar() {
|
||||
ret void
|
||||
}
|
||||
Loading…
Reference in a new issue