Changed my mind about __cxa_uncaught_exception and added it.

llvm-svn: 148754
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: e33b2f5c97a61f53dc61bed8b82bf86b66001ce5
diff --git a/src/cxa_exception.cpp b/src/cxa_exception.cpp
index 96868f5..ba4f84d 100644
--- a/src/cxa_exception.cpp
+++ b/src/cxa_exception.cpp
@@ -505,6 +505,15 @@
     // If we return client will call terminate()
 }
 
+bool
+__cxa_uncaught_exception() throw()
+{
+    __cxa_eh_globals* globals = __cxa_get_globals_fast();
+    if (globals == 0)
+        return false;
+    return globals->uncaughtExceptions != 0;
+}
+
 }  // extern "C"
 
 }  // abi