From d0ed21e94ddbc12cbec3cea0aab89d470adfbd57 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Wed, 29 Feb 2012 15:37:30 +0000 Subject: [PATCH] I'm reverting one of the changes made to exception.cpp in r151717. I'm unsure what the change was trying to do, but it didn't do the right thing for __APPLE__. So instead of trying to guess what was intended, I'm just putting it back the way it was. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151727 91177308-0d34-0410-b5e6-96231b3b80d8 --- src/exception.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/exception.cpp b/src/exception.cpp index 92234b21..6b5e6984 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -99,6 +99,10 @@ bool uncaught_exception() _NOEXCEPT #if __APPLE__ // on Darwin, there is a helper function so __cxa_get_globals is private return __cxa_uncaught_exception(); +#elif LIBCXXRT + __cxa_eh_globals * globals = __cxa_get_globals(); + return (globals->uncaughtExceptions != 0); +#else // __APPLE__ #warning uncaught_exception not yet implemented ::abort(); #endif // __APPLE__