14#ifndef LLVM_SUPPORT_ERRORHANDLING_H
15#define LLVM_SUPPORT_ERRORHANDLING_H
45 void *user_data =
nullptr);
55 void *user_data =
nullptr) {
72 bool gen_crash_diag =
true);
74 bool gen_crash_diag =
true);
76 bool gen_crash_diag =
true);
95 void *user_data =
nullptr);
115 bool GenCrashDiag =
true);
143#define llvm_unreachable(msg) \
144 ::llvm::llvm_unreachable_internal(msg, __FILE__, __LINE__)
145#elif !defined(LLVM_BUILTIN_UNREACHABLE)
146#define llvm_unreachable(msg) ::llvm::llvm_unreachable_internal()
147#elif LLVM_UNREACHABLE_OPTIMIZE
148#define llvm_unreachable(msg) LLVM_BUILTIN_UNREACHABLE
150#define llvm_unreachable(msg) \
153 LLVM_BUILTIN_UNREACHABLE; \
dot regions Print regions of function to dot file(with no function bodies)"
This is an optimization pass for GlobalISel generic memory operations.
void(* fatal_error_handler_t)(void *user_data, const char *reason, bool gen_crash_diag)
An error handler callback.
void install_fatal_error_handler(fatal_error_handler_t handler, void *user_data=nullptr)
install_fatal_error_handler - Installs a new error handler to be used whenever a serious (non-recover...
void install_bad_alloc_error_handler(fatal_error_handler_t handler, void *user_data=nullptr)
Installs a new bad alloc error handler that should be used whenever a bad alloc error,...
void remove_bad_alloc_error_handler()
Restores default bad alloc error handling behavior.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
void install_out_of_memory_new_handler()
void llvm_unreachable_internal(const char *msg=nullptr, const char *file=nullptr, unsigned line=0)
This function calls abort(), and prints the optional message to stderr.
void remove_fatal_error_handler()
Restores default error handling behaviour.
void report_bad_alloc_error(const char *Reason, bool GenCrashDiag=true)
Reports a bad alloc error, calling any user defined bad alloc error handler.
ScopedFatalErrorHandler - This is a simple helper class which just calls install_fatal_error_handler ...
~ScopedFatalErrorHandler()
ScopedFatalErrorHandler(fatal_error_handler_t handler, void *user_data=nullptr)