summaryrefslogtreecommitdiffstats
path: root/libcxx/src/exception.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-02-29 15:37:30 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-02-29 15:37:30 +0000
commit27e618efb6afc5d80ee1485f8b9df14492d5cd80 (patch)
tree8d00938803fdc323ce8b6b825e0c86e47e94a0d9 /libcxx/src/exception.cpp
parent272a071d65be9426cba2c4cd7f50dbc4c9599d61 (diff)
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.
llvm-svn: 151727
Diffstat (limited to 'libcxx/src/exception.cpp')
-rw-r--r--libcxx/src/exception.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp
index 92234b21d0f7..6b5e6984a606 100644
--- a/libcxx/src/exception.cpp
+++ b/libcxx/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__