summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src
diff options
context:
space:
mode:
Diffstat (limited to 'libcxxabi/src')
-rw-r--r--libcxxabi/src/cxa_vector.cpp2
-rw-r--r--libcxxabi/src/exception.cpp41
2 files changed, 42 insertions, 1 deletions
diff --git a/libcxxabi/src/cxa_vector.cpp b/libcxxabi/src/cxa_vector.cpp
index 67ecc243142..926c01dd349 100644
--- a/libcxxabi/src/cxa_vector.cpp
+++ b/libcxxabi/src/cxa_vector.cpp
@@ -258,7 +258,7 @@ void __cxa_vec_dtor(
size_t idx = element_count;
st_cxa_cleanup cleanup ( array_address, idx, element_size, destructor );
{
- st_terminate exception_guard (std::uncaught_exception ());
+ st_terminate exception_guard (__cxa_uncaught_exception ());
ptr += element_count * element_size; // one past the last element
while ( idx-- > 0 ) {
diff --git a/libcxxabi/src/exception.cpp b/libcxxabi/src/exception.cpp
new file mode 100644
index 00000000000..c47a9b76266
--- /dev/null
+++ b/libcxxabi/src/exception.cpp
@@ -0,0 +1,41 @@
+//===---------------------------- exception.cpp ---------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <exception>
+
+#pragma GCC visibility push(default)
+
+namespace std
+{
+
+// exception
+
+exception::~exception() _NOEXCEPT
+{
+}
+
+const char* exception::what() const _NOEXCEPT
+{
+ return "std::exception";
+}
+
+// bad_exception
+
+bad_exception::~bad_exception() _NOEXCEPT
+{
+}
+
+const char* bad_exception::what() const _NOEXCEPT
+{
+ return "std::bad_exception";
+}
+
+} // std
+
+#pragma GCC visibility pop
OpenPOWER on IntegriCloud