|
|
|||
File indexing completed on 2026-05-10 08:43:01
0001 /*===-- llvm-c/ErrorHandling.h - Error Handling C Interface -------*- C -*-===*\ 0002 |* *| 0003 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| 0004 |* Exceptions. *| 0005 |* See https://llvm.org/LICENSE.txt for license information. *| 0006 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| 0007 |* *| 0008 |*===----------------------------------------------------------------------===*| 0009 |* *| 0010 |* This file defines the C interface to LLVM's error handling mechanism. *| 0011 |* *| 0012 \*===----------------------------------------------------------------------===*/ 0013 0014 #ifndef LLVM_C_ERRORHANDLING_H 0015 #define LLVM_C_ERRORHANDLING_H 0016 0017 #include "llvm-c/ExternC.h" 0018 0019 LLVM_C_EXTERN_C_BEGIN 0020 0021 /** 0022 * @addtogroup LLVMCError 0023 * 0024 * @{ 0025 */ 0026 0027 typedef void (*LLVMFatalErrorHandler)(const char *Reason); 0028 0029 /** 0030 * Install a fatal error handler. By default, if LLVM detects a fatal error, it 0031 * will call exit(1). This may not be appropriate in many contexts. For example, 0032 * doing exit(1) will bypass many crash reporting/tracing system tools. This 0033 * function allows you to install a callback that will be invoked prior to the 0034 * call to exit(1). 0035 */ 0036 void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler); 0037 0038 /** 0039 * Reset the fatal error handler. This resets LLVM's fatal error handling 0040 * behavior to the default. 0041 */ 0042 void LLVMResetFatalErrorHandler(void); 0043 0044 /** 0045 * Enable LLVM's built-in stack trace code. This intercepts the OS's crash 0046 * signals and prints which component of LLVM you were in at the time if the 0047 * crash. 0048 */ 0049 void LLVMEnablePrettyStackTrace(void); 0050 0051 /** 0052 * @} 0053 */ 0054 0055 LLVM_C_EXTERN_C_END 0056 0057 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|