1 //===- exception.h - Generic language-independent exceptions ----*- C++ -*-===//
3 // This file defines the the shared data structures used by all language
4 // specific exception handling runtime libraries.
6 //===----------------------------------------------------------------------===//
11 struct llvm_exception {
12 // ExceptionDestructor - This call-back function is used to destroy the
13 // current exception, without requiring the caller to know what the concrete
16 void (*ExceptionDestructor)(llvm_exception *);
18 // ExceptionType - This field identifies what runtime library this exception
19 // came from. Currently defined values are:
21 // 1 - longjmp exception (see longjmp-exception.c)
22 // 2 - C++ exception (see c++-exception.c)
24 unsigned ExceptionType;
26 // Next - This points to the next exception in the current stack.
29 // HandlerCount - This is a count of the number of handlers which have
30 // currently caught this exception. If the handler is caught and this number
31 // falls to zero, the exception is destroyed.
33 unsigned HandlerCount;
42 // Language independent exception handling API...
45 bool __llvm_eh_has_uncaught_exception(void);
46 void *__llvm_eh_current_uncaught_exception_type(unsigned HandlerType);