Go to the source code of this file.
|
namespace | llvm |
| This is an optimization pass for GlobalISel generic memory operations.
|
|
|
LLVM_ABI void | llvm::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-recoverable) error is encountered by LLVM.
|
|
LLVM_ABI void | llvm::remove_fatal_error_handler () |
| Restores default error handling behaviour.
|
|
LLVM_ABI void | llvm::report_fatal_error (const char *reason, bool gen_crash_diag=true) |
|
LLVM_ABI void | llvm::report_fatal_error (StringRef reason, bool gen_crash_diag=true) |
|
LLVM_ABI void | llvm::report_fatal_error (const Twine &reason, bool gen_crash_diag=true) |
|
LLVM_ABI void | llvm::reportFatalInternalError (const char *reason) |
| Report a fatal error that likely indicates a bug in LLVM.
|
|
LLVM_ABI void | llvm::reportFatalInternalError (StringRef reason) |
|
LLVM_ABI void | llvm::reportFatalInternalError (const Twine &reason) |
|
LLVM_ABI void | llvm::reportFatalUsageError (const char *reason) |
| Report a fatal error that does not indicate a bug in LLVM.
|
|
LLVM_ABI void | llvm::reportFatalUsageError (StringRef reason) |
|
LLVM_ABI void | llvm::reportFatalUsageError (const Twine &reason) |
|
LLVM_ABI void | llvm::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.
|
|
LLVM_ABI void | llvm::remove_bad_alloc_error_handler () |
| Restores default bad alloc error handling behavior.
|
|
LLVM_ABI void | llvm::install_out_of_memory_new_handler () |
|
LLVM_ABI void | llvm::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 | llvm::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_unreachable
Marks that the current location is not supposed to be reachable.
In !NDEBUG builds, prints the message and location info to stderr. In NDEBUG builds, if the platform does not support a builtin unreachable then we call an internal LLVM runtime function. Otherwise the behavior is controlled by the CMake flag -DLLVM_UNREACHABLE_OPTIMIZE
- When "ON" (default) llvm_unreachable() becomes an optimizer hint that the current location is not supposed to be reachable: the hint turns such code path into undefined behavior. On compilers that don't support such hints, prints a reduced message instead and aborts the program.
- When "OFF", a builtin_trap is emitted instead of an Use this instead of assert(0). It conveys intent more clearly, suppresses diagnostics for unreachable code paths, and allows compilers to omit unnecessary code.
Definition at line 164 of file ErrorHandling.h.