Implement uncaught_exceptions() using the newly added hooks in libc++abi, when available

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238846 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2015-06-02 15:33:38 +00:00
parent 708b86b5f9
commit 8731c5da46
4 changed files with 60 additions and 7 deletions

View File

@@ -48,7 +48,8 @@ terminate_handler set_terminate(terminate_handler f ) noexcept;
terminate_handler get_terminate() noexcept;
[[noreturn]] void terminate() noexcept;
bool uncaught_exception() noexcept;
bool uncaught_exception() noexcept;
int uncaught_exceptions() noexcept; // C++17
typedef unspecified exception_ptr;
@@ -115,6 +116,7 @@ _LIBCPP_FUNC_VIS terminate_handler get_terminate() _NOEXCEPT;
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void terminate() _NOEXCEPT;
_LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
_LIBCPP_FUNC_VIS int uncaught_exceptions() _NOEXCEPT;
class _LIBCPP_TYPE_VIS exception_ptr;