[clang] [lld] [llvm] [LLVM][Windows] Elide `PrettyStackTrace` output for usage errors (PR #140956)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Wed May 21 12:48:48 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);
----------------
nikic wrote:
These changes don't make sense: gen_crash_diag *is* already the flag that indicates whether this is a usage error and controls whether a stack trace is displayed.
Calling reportFatalUsageError() will correctly not display a stack trace and not ask for a bug report on Linux. If this is not the case on Windows, you need to identify why there is a difference in behavior. Adding an extra flag here is certainly the wrong thing to do though.
https://github.com/llvm/llvm-project/pull/140956
More information about the cfe-commits
mailing list