2011-03-20 20:38:12 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2011-03-22 00:08:45 +00:00
|
|
|
/**
|
|
|
|
* Allocates a C++ exception. This function is part of the Itanium C++ ABI and
|
|
|
|
* is provided externally.
|
|
|
|
*/
|
2011-04-05 17:21:30 +00:00
|
|
|
__attribute__((weak))
|
2011-03-20 20:38:12 +00:00
|
|
|
void *__cxa_allocate_exception(size_t thrown_size);
|
2011-03-22 00:08:45 +00:00
|
|
|
/**
|
|
|
|
* Initialises an exception object returned by __cxa_allocate_exception() for
|
|
|
|
* storing an Objective-C object. The return value is the location of the
|
|
|
|
* _Unwind_Exception structure within this structure, and should be passed to
|
|
|
|
* the C++ personality function.
|
|
|
|
*/
|
2011-04-05 17:21:30 +00:00
|
|
|
__attribute__((weak))
|
2011-03-20 20:38:12 +00:00
|
|
|
struct _Unwind_Exception *objc_init_cxx_exception(void *thrown_exception);
|
2011-03-22 00:08:45 +00:00
|
|
|
/**
|
|
|
|
* The GNU C++ exception personality function, provided by libsupc++ (GNU) or
|
|
|
|
* libcxxrt (PathScale).
|
|
|
|
*/
|
2011-11-09 21:03:35 +00:00
|
|
|
__attribute__((weak)) DECLARE_PERSONALITY_FUNCTION(__gxx_personality_v0);
|
2011-03-22 00:08:45 +00:00
|
|
|
/**
|
|
|
|
* Frees an exception object allocated by __cxa_allocate_exception(). Part of
|
|
|
|
* the Itanium C++ ABI.
|
|
|
|
*/
|
2011-04-05 17:21:30 +00:00
|
|
|
__attribute__((weak))
|
2011-03-20 20:38:12 +00:00
|
|
|
void __cxa_free_exception(void *thrown_exception);
|
2011-03-22 00:08:45 +00:00
|
|
|
/**
|
|
|
|
* Tests whether a C++ exception contains an Objective-C object, and returns if
|
|
|
|
* if it does. Returns -1 if it doesn't. -1 is used instead of 0, because
|
|
|
|
* throwing nil is allowed, but throwing non-nil, invalid objects is not.
|
|
|
|
*/
|
2011-04-05 17:21:30 +00:00
|
|
|
__attribute__((weak))
|
2011-03-20 20:38:12 +00:00
|
|
|
void *objc_object_for_cxx_exception(void *thrown_exception);
|
|
|
|
|
2011-03-22 00:08:45 +00:00
|
|
|
/**
|
|
|
|
* Prints the type info associated with an exception. Used only when
|
|
|
|
* debugging, not compiled in the normal build.
|
|
|
|
*/
|
2011-04-05 17:21:30 +00:00
|
|
|
__attribute__((weak))
|
2011-03-20 20:38:12 +00:00
|
|
|
void print_type_info(void *thrown_exception);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|