[llvm] Emit newline after IR-dump banner in PrintCallGraphPass (PR #199410)

Prerona Chaudhuri via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 03:19:35 PDT 2026


https://github.com/pchaudhuri-nv created https://github.com/llvm/llvm-project/pull/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.

>From 5ec66d242232344aee00e4d58176de7bb8af7d73 Mon Sep 17 00:00:00 2001
From: pchaudhuri-nv <pchaudhuri at nvidia.com>
Date: Sun, 24 May 2026 09:14:19 +0000
Subject: [PATCH] Emit newline after IR-dump banner in PrintCallGraphPass

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.
---
 llvm/lib/Analysis/CallGraphSCCPass.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp
index 9213ea8ea2383..3fd2fe02f6688 100644
--- a/llvm/lib/Analysis/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp
@@ -678,7 +678,7 @@ namespace {
       auto PrintBannerOnce = [&]() {
         if (BannerPrinted)
           return;
-        OS << Banner;
+        OS << Banner << "\n";
         BannerPrinted = true;
       };
 



More information about the llvm-commits mailing list