From 104024cb599ccdf52568449d1ac2cfaf940cef88 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Thu, 22 Aug 2013 19:39:03 +0000 Subject: [PATCH] Glen: replace obsolete _LIBCPP_CANTTHROW with _NOEXCEPT. llvm-svn: 189046 --- libcxx/include/__config | 4 ---- libcxx/src/stdexcept.cpp | 10 +++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/libcxx/include/__config b/libcxx/include/__config index 46e84bc0aac0..54ef541c5747 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -191,10 +191,6 @@ #define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS #endif -#ifndef _LIBCPP_CANTTHROW -#define _LIBCPP_CANTTHROW __attribute__ ((__nothrow__)) -#endif - #ifndef _LIBCPP_ALWAYS_INLINE #define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) #endif diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp index 8d25f3ee5427..62c945a6f573 100644 --- a/libcxx/src/stdexcept.cpp +++ b/libcxx/src/stdexcept.cpp @@ -47,9 +47,9 @@ private: count_t& count() const _NOEXCEPT {return (count_t&)(*(str_ - sizeof(count_t)));} public: explicit __libcpp_nmstr(const char* msg); - __libcpp_nmstr(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW; - __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW; - ~__libcpp_nmstr() _LIBCPP_CANTTHROW; + __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT; + __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT; + ~__libcpp_nmstr(); const char* c_str() const _NOEXCEPT {return str_;} }; @@ -65,14 +65,14 @@ __libcpp_nmstr::__libcpp_nmstr(const char* msg) } inline -__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) +__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT : str_(s.str_) { __sync_add_and_fetch(&count(), 1); } __libcpp_nmstr& -__libcpp_nmstr::operator=(const __libcpp_nmstr& s) +__libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT { const char* p = str_; str_ = s.str_;