Applied noexcept to everything in [language.support] (Chapter 18)

llvm-svn: 132129
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: fafca58c58453d8fcfc694d207738b0aa1215651
diff --git a/src/exception.cpp b/src/exception.cpp
index 42d0721..b0efda6 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -24,13 +24,13 @@
 #endif  // __APPLE__
 
 std::unexpected_handler
-std::set_unexpected(std::unexpected_handler func) throw()
+std::set_unexpected(std::unexpected_handler func) _NOEXCEPT
 {
     return __sync_lock_test_and_set(&__unexpected_handler, func);
 }
 
 std::unexpected_handler
-std::get_unexpected() throw()
+std::get_unexpected() _NOEXCEPT
 {
     return __sync_fetch_and_add(&__unexpected_handler, (std::unexpected_handler)0);
 }
@@ -45,13 +45,13 @@
 }
 
 std::terminate_handler
-std::set_terminate(std::terminate_handler func) throw()
+std::set_terminate(std::terminate_handler func) _NOEXCEPT
 {
     return __sync_lock_test_and_set(&__terminate_handler, func);
 }
 
 std::terminate_handler
-std::get_terminate() throw()
+std::get_terminate() _NOEXCEPT
 {
     return __sync_fetch_and_add(&__terminate_handler, (std::terminate_handler)0);
 }
@@ -76,7 +76,7 @@
 #endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
-bool std::uncaught_exception() throw()
+bool std::uncaught_exception() _NOEXCEPT
 {
 #if __APPLE__
     // on Darwin, there is a helper function so __cxa_get_globals is private
@@ -93,25 +93,25 @@
 namespace std
 {
 
-exception::~exception() throw()
+exception::~exception() _NOEXCEPT
 {
 }
 
-bad_exception::~bad_exception() throw()
+bad_exception::~bad_exception() _NOEXCEPT
 {
 }
 
-const char* exception::what() const throw()
+const char* exception::what() const _NOEXCEPT
 {
   return "std::exception";
 }
 
-const char* bad_exception::what() const throw()
+const char* bad_exception::what() const _NOEXCEPT
 {
   return "std::bad_exception";
 }
 
-exception_ptr::~exception_ptr()
+exception_ptr::~exception_ptr() _NOEXCEPT
 {
 #if __APPLE__
     __cxxabiapple::__cxa_decrement_exception_refcount(__ptr_);
@@ -121,7 +121,7 @@
 #endif  // __APPLE__
 }
 
-exception_ptr::exception_ptr(const exception_ptr& other)
+exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
     : __ptr_(other.__ptr_)
 {
 #if __APPLE__
@@ -132,7 +132,7 @@
 #endif  // __APPLE__
 }
 
-exception_ptr& exception_ptr::operator=(const exception_ptr& other)
+exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
 {
 #if __APPLE__
     if (__ptr_ != other.__ptr_)
@@ -148,12 +148,12 @@
 #endif  // __APPLE__
 }
 
-nested_exception::nested_exception()
+nested_exception::nested_exception() _NOEXCEPT
     : __ptr_(current_exception())
 {
 }
 
-nested_exception::~nested_exception()
+nested_exception::~nested_exception() _NOEXCEPT
 {
 }
 
@@ -168,7 +168,7 @@
 
 } // std
 
-std::exception_ptr std::current_exception()
+std::exception_ptr std::current_exception() _NOEXCEPT
 {
 #if __APPLE__
     // be nicer if there was a constructor that took a ptr, then