[PATCH] D86657: Add new hidden option -print-crash-IR that prints out IR that caused opt pipeline to crash

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 19:58:57 PDT 2020


jamieschmeiser updated this revision to Diff 288170.
jamieschmeiser added a comment.

[NFC] Reorder includes and change case of variable as suggested by
clang-tidy/clang-format.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86657/new/

https://reviews.llvm.org/D86657

Files:
  llvm/lib/Passes/StandardInstrumentations.cpp


Index: llvm/lib/Passes/StandardInstrumentations.cpp
===================================================================
--- llvm/lib/Passes/StandardInstrumentations.cpp
+++ llvm/lib/Passes/StandardInstrumentations.cpp
@@ -27,8 +27,8 @@
 #include "llvm/Support/CrashRecoveryContext.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/FormatVariadic.h"
-#include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Signals.h"
+#include "llvm/Support/raw_ostream.h"
 #include <vector>
 
 using namespace llvm;
@@ -200,7 +200,7 @@
   llvm_unreachable("Unknown wrapped IR type");
 }
 
-void CrashedIRReporter(void *P) {
+void crashedIRReporter(void *P) {
   PrintCrashIRInstrumentation *PCII = (PrintCrashIRInstrumentation *)P;
   dbgs() << PCII->getSavedIR();
 }
@@ -359,7 +359,7 @@
   if (!PrintCrashIR)
     return;
 
-  sys::AddSignalHandler(CrashedIRReporter, this);
+  sys::AddSignalHandler(crashedIRReporter, this);
 
   PIC.registerBeforePassCallback([this](StringRef PassID, Any IR) {
     SavedIR.clear();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86657.288170.patch
Type: text/x-patch
Size: 1020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200827/012b429b/attachment.bin>


More information about the llvm-commits mailing list