aboutsummaryrefslogtreecommitdiff
path: root/stdexcept.cc
diff options
context:
space:
mode:
authorDavid Chisnall <theraven@FreeBSD.org>2011-11-22 17:30:41 +0000
committerDavid Chisnall <theraven@FreeBSD.org>2011-11-22 17:30:41 +0000
commit6ec4e3f257f52d313f034b97021e98baea00fc7c (patch)
tree7b3792fade8be6c76ee5a507abfd3ca80ab10ff0 /stdexcept.cc
downloadsrc-6ec4e3f257f52d313f034b97021e98baea00fc7c.tar.gz
src-6ec4e3f257f52d313f034b97021e98baea00fc7c.zip
Import libcxxrt / libc++ into a vendor branch.vendor/libcxxrt/9802a7e430e08b90bf0e92d24abff095fa72ec21
Approved by: dim (mentor)
Notes
Notes: svn path=/vendor/libcxxrt/dist/; revision=227825 svn path=/vendor/libcxxrt/9802a7e430e08b90bf0e92d24abff095fa72ec21/; revision=227826; tag=vendor/libcxxrt/9802a7e430e08b90bf0e92d24abff095fa72ec21
Diffstat (limited to 'stdexcept.cc')
-rw-r--r--stdexcept.cc60
1 files changed, 60 insertions, 0 deletions
diff --git a/stdexcept.cc b/stdexcept.cc
new file mode 100644
index 000000000000..ba742401badb
--- /dev/null
+++ b/stdexcept.cc
@@ -0,0 +1,60 @@
+/**
+ * stdexcept.cc - provides stub implementations of the exceptions required by the runtime.
+ */
+#include "stdexcept.h"
+
+namespace std {
+
+exception::exception() throw() {}
+exception::~exception() {}
+exception::exception(const exception&) throw() {}
+exception& exception::operator=(const exception&) throw()
+{
+ return *this;
+}
+const char* exception::what() const throw()
+{
+ return "std::exception";
+}
+
+bad_alloc::bad_alloc() throw() {}
+bad_alloc::~bad_alloc() {}
+bad_alloc::bad_alloc(const bad_alloc&) throw() {}
+bad_alloc& bad_alloc::operator=(const bad_alloc&) throw()
+{
+ return *this;
+}
+const char* bad_alloc::what() const throw()
+{
+ return "cxxrt::bad_alloc";
+}
+
+
+
+bad_cast::bad_cast() throw() {}
+bad_cast::~bad_cast() {}
+bad_cast::bad_cast(const bad_cast&) throw() {}
+bad_cast& bad_cast::operator=(const bad_cast&) throw()
+{
+ return *this;
+}
+const char* bad_cast::what() const throw()
+{
+ return "std::bad_cast";
+}
+
+bad_typeid::bad_typeid() throw() {}
+bad_typeid::~bad_typeid() {}
+bad_typeid::bad_typeid(const bad_typeid &__rhs) throw() {}
+bad_typeid& bad_typeid::operator=(const bad_typeid &__rhs) throw()
+{
+ return *this;
+}
+
+const char* bad_typeid::what() const throw()
+{
+ return "std::bad_typeid";
+}
+
+} // namespace std
+