[PATCH] D151170: [StandardInstrumentations] Add option to dump IR to a file on crash

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 16:03:44 PDT 2023


aeubanks created this revision.
aeubanks added reviewers: hans, jgorbe.
Herald added a subscriber: hiraditya.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We already have -print-on-crash which dumps the IR to stderr on a crash, but it's more useful to dump to a file.

Introduce -print-on-crash-path to dump the IR to a file.

Making -print-on-crash a string option is confusing if you only pass -print-on-crash and it swallows up the next command line arg, which is why this is a new option.

Perhaps we could retire the dump to stderr version if people don't use it, but not sure how much people find that useful.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151170

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151170.524525.patch
Type: text/x-patch
Size: 4630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230522/550f0fcc/attachment.bin>


More information about the llvm-commits mailing list