Bruce Mitchener, Jr.: Port to emscripten.  Fixes http://llvm.org/bugs/show_bug.cgi?id=15624.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178354 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/exception.cpp b/src/exception.cpp
index 7db304d..1d2f6b2 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -77,6 +77,7 @@
     return __sync_fetch_and_add(&__terminate_handler, (terminate_handler)0);
 }
 
+#ifndef EMSCRIPTEN // We provide this in JS
 _LIBCPP_NORETURN
 void
 terminate() _NOEXCEPT
@@ -97,9 +98,10 @@
     }
 #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 defined(__APPLE__) || defined(_LIBCPPABI_VERSION)