[PATCH] D81672: [Driver] When forcing a crash call abort to get the correct diagnostic
John Brawn via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 18 09:49:53 PDT 2020
john.brawn marked an inline comment as done.
john.brawn added inline comments.
================
Comment at: clang/tools/driver/driver.cpp:518
+ CRC.DumpStackAndCleanupOnFailure = true;
+ CRC.RunSafely([&]() { abort(); });
}
----------------
aganea wrote:
> The only concern I have is that a unrelated call stack will be printed.
> Could you possibly add (and use here) a function along the lines of `emitBugReportMsg() { errs() << BugReportMsg; }`?
I had a go at doing that, but then realised that currently the bug report message only exists, and is only printed, when llvm is built with LLVM_ENABLE_BACKTRACES=ON which I don't think is what we want. I've instead adjusted things so that the bug report message is printed in CrashRecoveryContext instead of in the backtrace handler, which also means we can get the message without the backtrace here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81672/new/
https://reviews.llvm.org/D81672
More information about the cfe-commits
mailing list