summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/src/exception.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-04-27 22:47:52 +0000
committerdim <dim@FreeBSD.org>2013-04-27 22:47:52 +0000
commit815a6cc1e325a4e8596b91756039a7d699471b11 (patch)
treee5a6a26d0973c6968273f6fabb61cb3d624be555 /contrib/libc++/src/exception.cpp
parent1497a98f71419ff66d08ad2b8c90530e65521ac2 (diff)
downloadFreeBSD-src-815a6cc1e325a4e8596b91756039a7d699471b11.zip
FreeBSD-src-815a6cc1e325a4e8596b91756039a7d699471b11.tar.gz
Merge libc++ trunk r180598. Contains several minor cleanups and bug
fixes, no major changes. MFC after: 2 weeks
Diffstat (limited to 'contrib/libc++/src/exception.cpp')
-rw-r--r--contrib/libc++/src/exception.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/libc++/src/exception.cpp b/contrib/libc++/src/exception.cpp
index 0cd182b..1d2f6b2 100644
--- a/contrib/libc++/src/exception.cpp
+++ b/contrib/libc++/src/exception.cpp
@@ -14,7 +14,7 @@
#define __has_include(inc) 0
#endif
-#if __APPLE__
+#ifdef __APPLE__
#include <cxxabi.h>
using namespace __cxxabiv1;
@@ -77,6 +77,7 @@ get_terminate() _NOEXCEPT
return __sync_fetch_and_add(&__terminate_handler, (terminate_handler)0);
}
+#ifndef EMSCRIPTEN // We provide this in JS
_LIBCPP_NORETURN
void
terminate() _NOEXCEPT
@@ -97,12 +98,13 @@ terminate() _NOEXCEPT
}
#endif // _LIBCPP_NO_EXCEPTIONS
}
+#endif // !EMSCRIPTEN
#endif // !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
-#if !defined(LIBCXXRT) && !defined(__GLIBCXX__)
+#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(EMSCRIPTEN)
bool uncaught_exception() _NOEXCEPT
{
-#if __APPLE__ || defined(_LIBCPPABI_VERSION)
+#if defined(__APPLE__) || defined(_LIBCPPABI_VERSION)
// on Darwin, there is a helper function so __cxa_get_globals is private
return __cxa_uncaught_exception();
#else // __APPLE__
OpenPOWER on IntegriCloud