Lines Matching full:handler
64 void llvm::install_fatal_error_handler(fatal_error_handler_t handler,
69 assert(!ErrorHandler && "Error handler already registered!\n");
70 ErrorHandler = handler;
91 llvm::fatal_error_handler_t handler = nullptr;
94 // Only acquire the mutex while reading the handler, so as not to invoke a
99 handler = ErrorHandler;
103 if (handler) {
104 handler(handlerData, Reason.str().c_str(), GenCrashDiag);
128 void llvm::install_bad_alloc_error_handler(fatal_error_handler_t handler,
134 "Bad alloc error handler already registered!\n");
135 BadAllocErrorHandler = handler;
148 fatal_error_handler_t Handler = nullptr;
151 // Only acquire the mutex while reading the handler, so as not to invoke a
156 Handler = BadAllocErrorHandler;
160 if (Handler) {
161 Handler(HandlerData, Reason, GenCrashDiag);
162 llvm_unreachable("bad alloc handler should not return");
169 // Don't call the normal error handler. It may allocate memory. Directly write
181 // Do not set custom new handler if exceptions are enabled. In this case OOM
186 // Causes crash on allocation failure. It is called prior to the handler set by
192 // Installs new handler that causes crash on allocation failure. It is called by
198 "new-handler already installed");
223 LLVMFatalErrorHandler handler =
225 handler(reason);
228 void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler) {
230 LLVM_EXTENSION reinterpret_cast<void *>(Handler));