[X86] Don't report gather is legal on Skylake CPUs when AVX2/AVX512 is disabled....
[llvm-complete.git] / include / llvm-c / ErrorHandling.h
blob2059b3aeb15875bd6e107aa29bf38bed563e7e9c
1 /*===-- llvm-c/ErrorHandling.h - Error Handling C Interface -------*- C -*-===*\
2 |* *|
3 |* The LLVM Compiler Infrastructure *|
4 |* *|
5 |* This file is distributed under the University of Illinois Open Source *|
6 |* License. See LICENSE.TXT for details. *|
7 |* *|
8 |*===----------------------------------------------------------------------===*|
9 |* *|
10 |* This file defines the C interface to LLVM's error handling mechanism. *|
11 |* *|
12 \*===----------------------------------------------------------------------===*/
14 #ifndef LLVM_C_ERROR_HANDLING_H
15 #define LLVM_C_ERROR_HANDLING_H
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 typedef void (*LLVMFatalErrorHandler)(const char *Reason);
23 /**
24 * Install a fatal error handler. By default, if LLVM detects a fatal error, it
25 * will call exit(1). This may not be appropriate in many contexts. For example,
26 * doing exit(1) will bypass many crash reporting/tracing system tools. This
27 * function allows you to install a callback that will be invoked prior to the
28 * call to exit(1).
30 void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler);
32 /**
33 * Reset the fatal error handler. This resets LLVM's fatal error handling
34 * behavior to the default.
36 void LLVMResetFatalErrorHandler(void);
38 /**
39 * Enable LLVM's built-in stack trace code. This intercepts the OS's crash
40 * signals and prints which component of LLVM you were in at the time if the
41 * crash.
43 void LLVMEnablePrettyStackTrace(void);
45 #ifdef __cplusplus
47 #endif
49 #endif