LLVM  14.0.0git
Functions | Variables
ErrorHandling.h File Reference
#include "llvm-c/ExternC.h"
Include dependency graph for ErrorHandling.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void LLVMInstallFatalErrorHandler (LLVMFatalErrorHandler Handler)
 Install a fatal error handler. More...
 
void LLVMResetFatalErrorHandler (void)
 Reset the fatal error handler. More...
 
void LLVMEnablePrettyStackTrace (void)
 Enable LLVM's built-in stack trace code. More...
 

Variables

LLVM_C_EXTERN_C_BEGIN typedef void(* LLVMFatalErrorHandler )(const char *Reason)
 

Function Documentation

◆ LLVMEnablePrettyStackTrace()

void LLVMEnablePrettyStackTrace ( void  )

Enable LLVM's built-in stack trace code.

This intercepts the OS's crash signals and prints which component of LLVM you were in at the time if the crash.

Definition at line 322 of file PrettyStackTrace.cpp.

References llvm::EnablePrettyStackTrace().

◆ LLVMInstallFatalErrorHandler()

void LLVMInstallFatalErrorHandler ( LLVMFatalErrorHandler  Handler)

Install a fatal error handler.

By default, if LLVM detects a fatal error, it will call exit(1). This may not be appropriate in many contexts. For example, doing exit(1) will bypass many crash reporting/tracing system tools. This function allows you to install a callback that will be invoked prior to the call to exit(1).

Definition at line 224 of file ErrorHandling.cpp.

References bindingsErrorHandler(), llvm::install_fatal_error_handler(), and LLVM_EXTENSION.

◆ LLVMResetFatalErrorHandler()

void LLVMResetFatalErrorHandler ( void  )

Reset the fatal error handler.

This resets LLVM's fatal error handling behavior to the default.

Definition at line 229 of file ErrorHandling.cpp.

References llvm::remove_fatal_error_handler().

Variable Documentation

◆ LLVMFatalErrorHandler

LLVM_C_EXTERN_C_BEGIN typedef void(* LLVMFatalErrorHandler) (const char *Reason)

Definition at line 21 of file ErrorHandling.h.

Referenced by bindingsErrorHandler().