[cfe-commits] [libcxx] r152718 - in /libcxx/trunk/src: exception.cpp new.cpp

David Chisnall csdavec at swan.ac.uk
Wed Mar 14 07:11:14 PDT 2012


Author: theraven
Date: Wed Mar 14 09:11:13 2012
New Revision: 152718

URL: http://llvm.org/viewvc/llvm-project?rev=152718&view=rev
Log:
Undo some overzealous #ifdefs for LIBCXXRT.


Modified:
    libcxx/trunk/src/exception.cpp
    libcxx/trunk/src/new.cpp

Modified: libcxx/trunk/src/exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/exception.cpp?rev=152718&r1=152717&r2=152718&view=diff
==============================================================================
--- libcxx/trunk/src/exception.cpp (original)
+++ libcxx/trunk/src/exception.cpp Wed Mar 14 09:11:13 2012
@@ -114,13 +114,17 @@
 {
 }
 
-bad_exception::~bad_exception() _NOEXCEPT
+const char* exception::what() const _NOEXCEPT
 {
+  return "std::exception";
 }
 
-const char* exception::what() const _NOEXCEPT
+#endif  // _LIBCPPABI_VERSION
+#endif //LIBCXXRT
+#ifndef _LIBCPPABI_VERSION
+
+bad_exception::~bad_exception() _NOEXCEPT
 {
-  return "std::exception";
 }
 
 const char* bad_exception::what() const _NOEXCEPT
@@ -128,8 +132,8 @@
   return "std::bad_exception";
 }
 
-#endif  // _LIBCPPABI_VERSION
-#endif //LIBCXXRT
+#endif
+
 
 exception_ptr::~exception_ptr() _NOEXCEPT
 {

Modified: libcxx/trunk/src/new.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/new.cpp?rev=152718&r1=152717&r2=152718&view=diff
==============================================================================
--- libcxx/trunk/src/new.cpp (original)
+++ libcxx/trunk/src/new.cpp Wed Mar 14 09:11:13 2012
@@ -24,8 +24,6 @@
     static std::new_handler __new_handler;
 #endif
 
-#if !defined (LIBCXXRT) // && !defined(_LIBCPPABI_VERSION)
-
 // Implement all new and delete operators as weak definitions
 // in this shared library, so that they can be overriden by programs
 // that define non-weak copies of the functions.
@@ -134,8 +132,6 @@
     ::operator delete[](ptr);
 }
 
-#endif  // !_LIBCPPABI_VERSION && !LIBCXXRT
-
 namespace std
 {
 
@@ -171,6 +167,8 @@
     return "std::bad_alloc";
 }
 
+#endif //LIBCXXRT
+
 bad_array_new_length::bad_array_new_length() _NOEXCEPT
 {
 }
@@ -186,7 +184,6 @@
 }
 
 #endif
-#endif //LIBCXXRT
 
 void
 __throw_bad_alloc()





More information about the cfe-commits mailing list