xref: /netbsd-src/external/apache2/llvm/dist/clang/include/clang-c/FatalErrorHandler.h (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
17330f729Sjoerg /*===-- clang-c/FatalErrorHandler.h - Fatal Error Handling --------*- C -*-===*\
27330f729Sjoerg |*                                                                            *|
37330f729Sjoerg |* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
47330f729Sjoerg |* Exceptions.                                                                *|
57330f729Sjoerg |* See https://llvm.org/LICENSE.txt for license information.                  *|
67330f729Sjoerg |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
77330f729Sjoerg |*                                                                            *|
87330f729Sjoerg \*===----------------------------------------------------------------------===*/
97330f729Sjoerg 
107330f729Sjoerg #ifndef LLVM_CLANG_C_FATAL_ERROR_HANDLER_H
117330f729Sjoerg #define LLVM_CLANG_C_FATAL_ERROR_HANDLER_H
127330f729Sjoerg 
13*e038c9c4Sjoerg #include "clang-c/ExternC.h"
14*e038c9c4Sjoerg 
15*e038c9c4Sjoerg LLVM_CLANG_C_EXTERN_C_BEGIN
167330f729Sjoerg 
177330f729Sjoerg /**
187330f729Sjoerg  * Installs error handler that prints error message to stderr and calls abort().
197330f729Sjoerg  * Replaces currently installed error handler (if any).
207330f729Sjoerg  */
217330f729Sjoerg void clang_install_aborting_llvm_fatal_error_handler(void);
227330f729Sjoerg 
237330f729Sjoerg /**
247330f729Sjoerg  * Removes currently installed error handler (if any).
257330f729Sjoerg  * If no error handler is intalled, the default strategy is to print error
267330f729Sjoerg  * message to stderr and call exit(1).
277330f729Sjoerg  */
287330f729Sjoerg void clang_uninstall_llvm_fatal_error_handler(void);
297330f729Sjoerg 
30*e038c9c4Sjoerg LLVM_CLANG_C_EXTERN_C_END
31*e038c9c4Sjoerg 
327330f729Sjoerg #endif
33