Move typeinfos for exceptions in <stdexcept> to the abi

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150835 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2012-02-17 19:24:42 +00:00
parent 1e9f55f2d2
commit e1642e1c00
2 changed files with 74 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
#include <cstdint>
#include <cstddef>
#include "system_error"
#include <cxxabi.h>
// Note: optimize for size
@@ -113,6 +114,8 @@ logic_error::operator=(const logic_error& le) _NOEXCEPT
return *this;
}
#ifndef _LIBCPPABI_VERSION
logic_error::~logic_error() _NOEXCEPT
{
__libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
@@ -126,6 +129,8 @@ logic_error::what() const _NOEXCEPT
return s.c_str();
}
#endif
runtime_error::runtime_error(const string& msg)
{
__libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
@@ -153,6 +158,8 @@ runtime_error::operator=(const runtime_error& le) _NOEXCEPT
return *this;
}
#ifndef _LIBCPPABI_VERSION
runtime_error::~runtime_error() _NOEXCEPT
{
__libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
@@ -175,4 +182,6 @@ range_error::~range_error() _NOEXCEPT {}
overflow_error::~overflow_error() _NOEXCEPT {}
underflow_error::~underflow_error() _NOEXCEPT {}
#endif
} // std