14#ifndef LLVM_SUPPORT_ERRORHANDLING_H
15#define LLVM_SUPPORT_ERRORHANDLING_H
44 void *user_data =
nullptr);
54 void *user_data =
nullptr) {
64 bool gen_crash_diag =
true);
66 bool gen_crash_diag =
true);
68 bool gen_crash_diag =
true);
116 void *user_data =
nullptr);
136 bool GenCrashDiag =
true);
142 const char *
file =
nullptr,
164#define llvm_unreachable(msg) \
165 ::llvm::llvm_unreachable_internal(msg, __FILE__, __LINE__)
166#elif !defined(LLVM_BUILTIN_UNREACHABLE)
167#define llvm_unreachable(msg) ::llvm::llvm_unreachable_internal()
168#elif LLVM_UNREACHABLE_OPTIMIZE
169#define llvm_unreachable(msg) LLVM_BUILTIN_UNREACHABLE
171#define llvm_unreachable(msg) \
174 LLVM_BUILTIN_UNREACHABLE; \
dot regions Print regions of function to dot file(with no function bodies)"
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
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.
LLVM_ABI 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...
LLVM_ABI 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,...
LLVM_ABI void remove_bad_alloc_error_handler()
Restores default bad alloc error handling behavior.
LLVM_ABI void reportFatalInternalError(Error Err)
Report a fatal error that indicates a bug in LLVM.
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
LLVM_ABI void install_out_of_memory_new_handler()
LLVM_ABI 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.
LLVM_ABI void remove_fatal_error_handler()
Restores default error handling behaviour.
LLVM_ABI void report_bad_alloc_error(const char *Reason, bool GenCrashDiag=true)
Reports a bad alloc error, calling any user defined bad alloc error handler.
LLVM_ABI void reportFatalUsageError(Error Err)
Report a fatal error that does not indicate a bug in LLVM.
~ScopedFatalErrorHandler()
ScopedFatalErrorHandler(fatal_error_handler_t handler, void *user_data=nullptr)