Skip to content

Commit 507f5f1

Browse files
InakiVALukacma
authored andcommitted
Begin -print-on-crash output with semicolon (llvm#164903)
So it's treated as a comment and doesn't need to be manually removed from the output when used as IR.
1 parent b448753 commit 507f5f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Passes/StandardInstrumentations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2499,7 +2499,7 @@ void PrintCrashIRInstrumentation::registerCallbacks(
24992499
[&PIC, this](StringRef PassID, Any IR) {
25002500
SavedIR.clear();
25012501
raw_string_ostream OS(SavedIR);
2502-
OS << formatv("*** Dump of {0}IR Before Last Pass {1}",
2502+
OS << formatv("; *** Dump of {0}IR Before Last Pass {1}",
25032503
llvm::forcePrintModuleIR() ? "Module " : "", PassID);
25042504
if (!isInteresting(IR, PassID, PIC.getPassNameForClassName(PassID))) {
25052505
OS << " Filtered Out ***\n";

llvm/test/Other/print-on-crash.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
; 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
1919

20-
; CHECK_SIMPLE: *** Dump of IR Before Last Pass {{.*}} Started ***
20+
; CHECK_SIMPLE: ; *** Dump of IR Before Last Pass {{.*}} Started ***
2121
; CHECK_SIMPLE: @main
2222
; CHECK_SIMPLE: entry:
2323
; CHECK_NO_CRASH-NOT: *** Dump of IR

0 commit comments

Comments
 (0)