1*a7dea167SDimitry Andric /*===-- clang-c/FatalErrorHandler.h - Fatal Error Handling --------*- C -*-===*\ 2*a7dea167SDimitry Andric |* *| 3*a7dea167SDimitry Andric |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| 4*a7dea167SDimitry Andric |* Exceptions. *| 5*a7dea167SDimitry Andric |* See https://llvm.org/LICENSE.txt for license information. *| 6*a7dea167SDimitry Andric |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| 7*a7dea167SDimitry Andric |* *| 8*a7dea167SDimitry Andric \*===----------------------------------------------------------------------===*/ 9*a7dea167SDimitry Andric 10*a7dea167SDimitry Andric #ifndef LLVM_CLANG_C_FATAL_ERROR_HANDLER_H 11*a7dea167SDimitry Andric #define LLVM_CLANG_C_FATAL_ERROR_HANDLER_H 12*a7dea167SDimitry Andric 13*a7dea167SDimitry Andric #ifdef __cplusplus 14*a7dea167SDimitry Andric extern "C" { 15*a7dea167SDimitry Andric #endif 16*a7dea167SDimitry Andric 17*a7dea167SDimitry Andric /** 18*a7dea167SDimitry Andric * Installs error handler that prints error message to stderr and calls abort(). 19*a7dea167SDimitry Andric * Replaces currently installed error handler (if any). 20*a7dea167SDimitry Andric */ 21*a7dea167SDimitry Andric void clang_install_aborting_llvm_fatal_error_handler(void); 22*a7dea167SDimitry Andric 23*a7dea167SDimitry Andric /** 24*a7dea167SDimitry Andric * Removes currently installed error handler (if any). 25*a7dea167SDimitry Andric * If no error handler is intalled, the default strategy is to print error 26*a7dea167SDimitry Andric * message to stderr and call exit(1). 27*a7dea167SDimitry Andric */ 28*a7dea167SDimitry Andric void clang_uninstall_llvm_fatal_error_handler(void); 29*a7dea167SDimitry Andric 30*a7dea167SDimitry Andric #ifdef __cplusplus 31*a7dea167SDimitry Andric } 32*a7dea167SDimitry Andric #endif 33*a7dea167SDimitry Andric #endif 34