|
LLVM
8.0.1
|
#include "llvm/Support/ErrorHandling.h"#include "llvm-c/ErrorHandling.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Twine.h"#include "llvm/Config/config.h"#include "llvm/Support/Debug.h"#include "llvm/Support/Errc.h"#include "llvm/Support/Error.h"#include "llvm/Support/Signals.h"#include "llvm/Support/Threading.h"#include "llvm/Support/WindowsError.h"#include "llvm/Support/raw_ostream.h"#include <cassert>#include <cstdlib>#include <mutex>#include <new>#include <unistd.h>
Go to the source code of this file.
Classes | |
| class | NewHandlerInstaller |
Functions | |
| static void | out_of_memory_new_handler () |
| static void | bindingsErrorHandler (void *user_data, const std::string &reason, bool gen_crash_diag) |
| void | LLVMInstallFatalErrorHandler (LLVMFatalErrorHandler Handler) |
| Install a fatal error handler. More... | |
| void | LLVMResetFatalErrorHandler () |
| Reset the fatal error handler. More... | |
Variables | |
| static fatal_error_handler_t | ErrorHandler = nullptr |
| static void * | ErrorHandlerUserData = nullptr |
| static fatal_error_handler_t | BadAllocErrorHandler = nullptr |
| static void * | BadAllocErrorHandlerUserData = nullptr |
| static std::mutex | ErrorHandlerMutex |
| static std::mutex | BadAllocErrorHandlerMutex |
| static class NewHandlerInstaller | new_handler_installer |
|
static |
Definition at line 230 of file ErrorHandling.cpp.
References LLVM_EXTENSION.
Referenced by LLVMInstallFatalErrorHandler().
| void LLVMInstallFatalErrorHandler | ( | LLVMFatalErrorHandler | Handler | ) |
Install a fatal error handler.
By default, if LLVM detects a fatal error, it will call exit(1). This may not be appropriate in many contexts. For example, doing exit(1) will bypass many crash reporting/tracing system tools. This function allows you to install a callback that will be invoked prior to the call to exit(1).
Definition at line 237 of file ErrorHandling.cpp.
References bindingsErrorHandler(), llvm::install_fatal_error_handler(), and LLVM_EXTENSION.
| void LLVMResetFatalErrorHandler | ( | void | ) |
Reset the fatal error handler.
This resets LLVM's fatal error handling behavior to the default.
Definition at line 242 of file ErrorHandling.cpp.
References llvm::bad_address, llvm::bad_file_descriptor, llvm::device_or_resource_busy, llvm::directory_not_empty, llvm::file_exists, llvm::filename_too_long, llvm::function_not_supported, llvm::interrupted, llvm::invalid_argument, llvm::io_error, llvm::mapWindowsError(), llvm::no_lock_available, llvm::no_space_on_device, llvm::no_such_device, llvm::no_such_file_or_directory, llvm::not_enough_memory, llvm::permission_denied, llvm::remove_fatal_error_handler(), llvm::resource_unavailable_try_again, and llvm::too_many_files_open.
|
static |
Definition at line 186 of file ErrorHandling.cpp.
References llvm::report_bad_alloc_error().
Referenced by llvm::install_out_of_memory_new_handler().
|
static |
Definition at line 45 of file ErrorHandling.cpp.
Referenced by llvm::install_bad_alloc_error_handler(), llvm::remove_bad_alloc_error_handler(), and llvm::report_bad_alloc_error().
|
static |
Definition at line 61 of file ErrorHandling.cpp.
Referenced by llvm::install_bad_alloc_error_handler(), llvm::remove_bad_alloc_error_handler(), and llvm::report_bad_alloc_error().
|
static |
Definition at line 46 of file ErrorHandling.cpp.
Referenced by llvm::install_bad_alloc_error_handler(), llvm::remove_bad_alloc_error_handler(), and llvm::report_bad_alloc_error().
|
static |
Definition at line 42 of file ErrorHandling.cpp.
Referenced by llvm::install_bad_alloc_error_handler(), llvm::install_fatal_error_handler(), llvm::remove_fatal_error_handler(), and llvm::report_fatal_error().
|
static |
Definition at line 60 of file ErrorHandling.cpp.
Referenced by llvm::install_fatal_error_handler(), llvm::remove_fatal_error_handler(), and llvm::report_fatal_error().
|
static |
Definition at line 43 of file ErrorHandling.cpp.
Referenced by llvm::install_fatal_error_handler(), llvm::remove_fatal_error_handler(), and llvm::report_fatal_error().
|
static |
Referenced by NewHandlerInstaller::NewHandlerInstaller().
1.8.13