From e1642e1c00d30993616c7293959b33fe2007ba2e Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 17 Feb 2012 19:24:42 +0000 Subject: [PATCH] Move typeinfos for exceptions in to the abi git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150835 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/libc++abi2.exp | 65 ++++++++++++++++++++++++++++++++++++++++++++++ src/stdexcept.cpp | 9 +++++++ 2 files changed, 74 insertions(+) diff --git a/lib/libc++abi2.exp b/lib/libc++abi2.exp index 471c6864..9d7a5e77 100644 --- a/lib/libc++abi2.exp +++ b/lib/libc++abi2.exp @@ -201,3 +201,68 @@ __ZTISt10bad_typeid __ZTISt8bad_cast ___cxa_bad_typeid ___cxa_bad_cast + +__ZNKSt11logic_error4whatEv +__ZNSt11logic_errorD0Ev +__ZNSt11logic_errorD1Ev +__ZNSt11logic_errorD2Ev +__ZTISt11logic_error +__ZTSSt11logic_error +__ZTVSt11logic_error + +__ZNKSt13runtime_error4whatEv +__ZNSt13runtime_errorD0Ev +__ZNSt13runtime_errorD1Ev +__ZNSt13runtime_errorD2Ev +__ZTISt13runtime_error +__ZTSSt13runtime_error +__ZTVSt13runtime_error + +__ZNSt11range_errorD0Ev +__ZNSt11range_errorD1Ev +__ZNSt11range_errorD2Ev +__ZTISt11range_error +__ZTSSt11range_error +__ZTVSt11range_error + +__ZNSt12domain_errorD0Ev +__ZNSt12domain_errorD1Ev +__ZNSt12domain_errorD2Ev +__ZTISt12domain_error +__ZTSSt12domain_error +__ZTVSt12domain_error + +__ZNSt12length_errorD0Ev +__ZNSt12length_errorD1Ev +__ZNSt12length_errorD2Ev +__ZTISt12length_error +__ZTSSt12length_error +__ZTVSt12length_error + +__ZNSt12out_of_rangeD0Ev +__ZNSt12out_of_rangeD1Ev +__ZNSt12out_of_rangeD2Ev +__ZTISt12out_of_range +__ZTSSt12out_of_range +__ZTVSt12out_of_range + +__ZNSt14overflow_errorD0Ev +__ZNSt14overflow_errorD1Ev +__ZNSt14overflow_errorD2Ev +__ZTISt14overflow_error +__ZTSSt14overflow_error +__ZTVSt14overflow_error + +__ZNSt15underflow_errorD0Ev +__ZNSt15underflow_errorD1Ev +__ZNSt15underflow_errorD2Ev +__ZTISt15underflow_error +__ZTSSt15underflow_error +__ZTVSt15underflow_error + +__ZNSt16invalid_argumentD0Ev +__ZNSt16invalid_argumentD1Ev +__ZNSt16invalid_argumentD2Ev +__ZTISt16invalid_argument +__ZTSSt16invalid_argument +__ZTVSt16invalid_argument diff --git a/src/stdexcept.cpp b/src/stdexcept.cpp index 28917887..b516b0ca 100644 --- a/src/stdexcept.cpp +++ b/src/stdexcept.cpp @@ -15,6 +15,7 @@ #include #include #include "system_error" +#include // 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