[llvm] a065505 - Begin -print-on-crash output with semicolon (#164903)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 27 15:05:53 PDT 2025


Author: IƱaki V Arrechea
Date: 2025-10-27T22:05:48Z
New Revision: a06550574981d78f4e2ff5978391c4ed621e6b84

URL: https://github.com/llvm/llvm-project/commit/a06550574981d78f4e2ff5978391c4ed621e6b84
DIFF: https://github.com/llvm/llvm-project/commit/a06550574981d78f4e2ff5978391c4ed621e6b84.diff

LOG: Begin -print-on-crash output with semicolon (#164903)

So it's treated as a comment and doesn't need to be manually removed
from the output when used as IR.

Added: 
    

Modified: 
    llvm/lib/Passes/StandardInstrumentations.cpp
    llvm/test/Other/print-on-crash.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index de293308ae69e..7290a86503120 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/llvm/lib/Passes/StandardInstrumentations.cpp
@@ -2499,7 +2499,7 @@ void PrintCrashIRInstrumentation::registerCallbacks(
       [&PIC, this](StringRef PassID, Any IR) {
         SavedIR.clear();
         raw_string_ostream OS(SavedIR);
-        OS << formatv("*** Dump of {0}IR Before Last Pass {1}",
+        OS << formatv("; *** Dump of {0}IR Before Last Pass {1}",
                       llvm::forcePrintModuleIR() ? "Module " : "", PassID);
         if (!isInteresting(IR, PassID, PIC.getPassNameForClassName(PassID))) {
           OS << " Filtered Out ***\n";

diff  --git a/llvm/test/Other/print-on-crash.ll b/llvm/test/Other/print-on-crash.ll
index 565da0c389c16..f1e3414fb6352 100644
--- a/llvm/test/Other/print-on-crash.ll
+++ b/llvm/test/Other/print-on-crash.ll
@@ -17,7 +17,7 @@
 
 ; RUN: not --crash opt -print-on-crash -print-module-scope -passes=trigger-crash-module -filter-passes=blah < %s 2>&1 | FileCheck %s --check-prefix=CHECK_FILTERED
 
-; CHECK_SIMPLE: *** Dump of IR Before Last Pass {{.*}} Started ***
+; CHECK_SIMPLE: ; *** Dump of IR Before Last Pass {{.*}} Started ***
 ; CHECK_SIMPLE: @main
 ; CHECK_SIMPLE: entry:
 ; CHECK_NO_CRASH-NOT: *** Dump of IR


        


More information about the llvm-commits mailing list