summaryrefslogtreecommitdiffstats
path: root/contrib/libcxxrt
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-10-21 10:19:45 +0000
committerbapt <bapt@FreeBSD.org>2014-10-21 10:19:45 +0000
commit5a2c23629913b49964e727491a056b96969e67d4 (patch)
tree22b9a22aeb5f9b38f609801d107efeb6e148994b /contrib/libcxxrt
parent6d77d39adc4af4747365725d86f5fec16860b31a (diff)
downloadFreeBSD-src-5a2c23629913b49964e727491a056b96969e67d4.zip
FreeBSD-src-5a2c23629913b49964e727491a056b96969e67d4.tar.gz
Add support for __cxa_throw_bad_array_new_length in libcxxrt
It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC after: 3 weeks
Diffstat (limited to 'contrib/libcxxrt')
-rw-r--r--contrib/libcxxrt/auxhelper.cc5
-rw-r--r--contrib/libcxxrt/stdexcept.cc8
-rw-r--r--contrib/libcxxrt/stdexcept.h9
3 files changed, 22 insertions, 0 deletions
diff --git a/contrib/libcxxrt/auxhelper.cc b/contrib/libcxxrt/auxhelper.cc
index 213f8a0..3e98da0 100644
--- a/contrib/libcxxrt/auxhelper.cc
+++ b/contrib/libcxxrt/auxhelper.cc
@@ -75,3 +75,8 @@ extern "C" void __cxa_deleted_virtual()
{
abort();
}
+
+extern "C" void __cxa_throw_bad_array_new_length()
+{
+ throw std::bad_array_new_length();
+}
diff --git a/contrib/libcxxrt/stdexcept.cc b/contrib/libcxxrt/stdexcept.cc
index 687fc5e..74a7fe5 100644
--- a/contrib/libcxxrt/stdexcept.cc
+++ b/contrib/libcxxrt/stdexcept.cc
@@ -82,5 +82,13 @@ const char* bad_typeid::what() const throw()
return "std::bad_typeid";
}
+bad_array_new_length::bad_array_new_length() throw() {}
+bad_array_new_length::~bad_array_new_length() {}
+bad_array_new_length::bad_array_new_length(const bad_array_new_length&) throw() {}
+bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) throw()
+{
+ return *this;
+}
+
} // namespace std
diff --git a/contrib/libcxxrt/stdexcept.h b/contrib/libcxxrt/stdexcept.h
index 49eaf55..1aa5459 100644
--- a/contrib/libcxxrt/stdexcept.h
+++ b/contrib/libcxxrt/stdexcept.h
@@ -81,6 +81,15 @@ namespace std
virtual const char* what() const throw();
};
+ class bad_array_new_length: public exception
+ {
+ public:
+ bad_array_new_length() throw();
+ bad_array_new_length(const bad_array_new_length&) throw();
+ bad_array_new_length& operator=(const bad_array_new_length&) throw();
+ virtual ~bad_array_new_length();
+ virtual const char *what() const throw();
+ };
} // namespace std
OpenPOWER on IntegriCloud