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