Howard Hinnant | 5ec9183 | 2011-12-07 21:16:40 +0000 | [diff] [blame] | 1 | //===------------------------- cxa_handlers.cpp ---------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | // |
| 9 | // This file implements the functionality associated with the terminate_handler, |
| 10 | // unexpected_handler, and new_handler. |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
Howard Hinnant | 4ac72dd | 2012-03-19 16:20:34 +0000 | [diff] [blame^] | 13 | #ifndef _CXA_HANDLERS_H |
| 14 | #define _CXA_HANDLERS_H |
| 15 | |
Howard Hinnant | 5ec9183 | 2011-12-07 21:16:40 +0000 | [diff] [blame] | 16 | #include <exception> |
| 17 | |
| 18 | namespace std |
| 19 | { |
| 20 | |
Howard Hinnant | a9d8ec4 | 2012-01-24 18:26:29 +0000 | [diff] [blame] | 21 | __attribute__((visibility("hidden"), noreturn)) |
Howard Hinnant | 5ec9183 | 2011-12-07 21:16:40 +0000 | [diff] [blame] | 22 | void |
| 23 | __unexpected(unexpected_handler func); |
| 24 | |
Howard Hinnant | a9d8ec4 | 2012-01-24 18:26:29 +0000 | [diff] [blame] | 25 | __attribute__((visibility("hidden"), noreturn)) |
Howard Hinnant | 5ec9183 | 2011-12-07 21:16:40 +0000 | [diff] [blame] | 26 | void |
| 27 | __terminate(terminate_handler func) _NOEXCEPT; |
| 28 | |
| 29 | } // std |
Howard Hinnant | 4ac72dd | 2012-03-19 16:20:34 +0000 | [diff] [blame^] | 30 | |
| 31 | extern "C" |
| 32 | { |
| 33 | |
| 34 | extern void (*__cxa_terminate_handler)(); |
| 35 | extern void (*__cxa_unexpected_handler)(); |
| 36 | extern void (*__cxa_new_handler)(); |
| 37 | |
| 38 | } // extern "C" |
| 39 | |
| 40 | #endif // _CXA_HANDLERS_H |