15 #ifndef LLVM_SUPPORT_ERRORHANDLING_H 16 #define LLVM_SUPPORT_ERRORHANDLING_H 27 const std::string& reason,
47 void *user_data =
nullptr);
57 void *user_data =
nullptr) {
73 bool gen_crash_diag =
true);
75 bool gen_crash_diag =
true);
77 bool gen_crash_diag =
true);
79 bool gen_crash_diag =
true);
98 void *user_data =
nullptr);
136 #define llvm_unreachable(msg) \ 137 ::llvm::llvm_unreachable_internal(msg, __FILE__, __LINE__) 138 #elif defined(LLVM_BUILTIN_UNREACHABLE) 139 #define llvm_unreachable(msg) LLVM_BUILTIN_UNREACHABLE 141 #define llvm_unreachable(msg) ::llvm::llvm_unreachable_internal() *ViewGraph Emit a dot run run gv on the postscript file
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
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, e.g.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
void remove_fatal_error_handler()
Restores default error handling behaviour.
~ScopedFatalErrorHandler()
void(* fatal_error_handler_t)(void *user_data, const std::string &reason, bool gen_crash_diag)
An error handler callback.
void remove_bad_alloc_error_handler()
Restores default bad alloc error handling behavior.
void report_bad_alloc_error(const char *Reason, bool GenCrashDiag=true)
Reports a bad alloc error, calling any user defined bad alloc error handler.
#define LLVM_ATTRIBUTE_NORETURN
LLVM_ATTRIBUTE_NORETURN 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.
ScopedFatalErrorHandler - This is a simple helper class which just calls install_fatal_error_handler ...
ScopedFatalErrorHandler(fatal_error_handler_t handler, void *user_data=nullptr)
StringRef - Represent a constant reference to a string, i.e.
void install_out_of_memory_new_handler()
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...