[llvm] [Support] report_fatal_error: Do not generate crash backtrace by default (PR #128495)

Akshat Oke via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 03:40:59 PST 2025


================
@@ -68,58 +68,58 @@ namespace llvm {
 /// After the error handler is called this function will call abort(), it
 /// does not return.
 /// NOTE: The std::string variant was removed to avoid a <string> dependency.
-[[noreturn]] void report_fatal_error(const char *reason,
-                                     bool gen_crash_diag = true);
-[[noreturn]] void report_fatal_error(StringRef reason,
-                                     bool gen_crash_diag = true);
-[[noreturn]] void report_fatal_error(const Twine &reason,
-                                     bool gen_crash_diag = true);
-
-/// Installs a new bad alloc error handler that should be used whenever a
-/// bad alloc error, e.g. failing malloc/calloc, is encountered by LLVM.
-///
-/// The user can install a bad alloc handler, in order to define the behavior
-/// in case of failing allocations, e.g. throwing an exception. Note that this
-/// handler must not trigger any additional allocations itself.
-///
-/// If no error handler is installed the default is to print the error message
-/// to stderr, and call exit(1).  If an error handler is installed then it is
-/// the handler's responsibility to log the message, it will no longer be
-/// printed to stderr.  If the error handler returns, then exit(1) will be
-/// called.
-///
-///
-/// \param user_data - An argument which will be passed to the installed error
-/// handler.
-void install_bad_alloc_error_handler(fatal_error_handler_t handler,
-                                     void *user_data = nullptr);
+  [[noreturn]] void report_fatal_error(const char *reason,
----------------
optimisan wrote:

I think I should address the clang format in a pre patch

https://github.com/llvm/llvm-project/pull/128495


More information about the llvm-commits mailing list