Implement uncaught_exceptions() using the newly added hooks in libc++abi, when available

llvm-svn: 238846
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 89102f0fa96c1d3b53bf289802167fa78baaa83d
diff --git a/include/exception b/include/exception
index ef2b969..39d251e 100644
--- a/include/exception
+++ b/include/exception
@@ -48,7 +48,8 @@
 terminate_handler get_terminate() noexcept;
 [[noreturn]] void terminate() noexcept;
 
-bool uncaught_exception() noexcept;
+bool uncaught_exception()  noexcept;
+int  uncaught_exceptions() noexcept;  // C++17
 
 typedef unspecified exception_ptr;
 
@@ -115,6 +116,7 @@
 _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void terminate() _NOEXCEPT;
 
 _LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
+_LIBCPP_FUNC_VIS int uncaught_exceptions() _NOEXCEPT;
 
 class _LIBCPP_TYPE_VIS exception_ptr;