[clang] [lld] [llvm] [LLVM][Windows] Elide `PrettyStackTrace` output for usage errors (PR #140956)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 21 13:49:13 PDT 2025
================
@@ -61,11 +61,14 @@ struct ScopedFatalErrorHandler {
/// @deprecated Use reportFatalInternalError() or reportFatalUsageError()
/// instead.
[[noreturn]] LLVM_ABI void report_fatal_error(const char *reason,
- bool gen_crash_diag = true);
+ bool gen_crash_diag = true,
+ bool is_usage_error = false);
[[noreturn]] LLVM_ABI void report_fatal_error(StringRef reason,
- bool gen_crash_diag = true);
+ bool gen_crash_diag = true,
+ bool is_usage_error = false);
[[noreturn]] LLVM_ABI void report_fatal_error(const Twine &reason,
- bool gen_crash_diag = true);
+ bool gen_crash_diag = true,
+ bool is_usage_error = false);
----------------
bd1976bris wrote:
> > As to why Windows has different behaviour - on Linux LLVM once called the signal handler for `report_fatal_error` IIUC but this seems to have changed in: [288999b](https://github.com/llvm/llvm-project/commit/288999b82959d6a057bfd478a196961215baf792).
>
> So, can we do the same change for Windows? Basically pass false to Cleanup in the Windows RunInterruptHandlers, or something along those lines?
Seems to work and much better. Thanks!
https://github.com/llvm/llvm-project/pull/140956
More information about the cfe-commits
mailing list