[cfe-commits] [libcxx] r111751 - in /libcxx/trunk/src: bind.cpp chrono.cpp exception.cpp hash.cpp ios.cpp locale.cpp memory.cpp mutex.cpp new.cpp random.cpp regex.cpp string.cpp strstream.cpp system_error.cpp thread.cpp typeinfo.cpp

Howard Hinnant hhinnant at apple.com
Sat Aug 21 17:03:28 PDT 2010


Author: hhinnant
Date: Sat Aug 21 19:03:27 2010
New Revision: 111751

URL: http://llvm.org/viewvc/llvm-project?rev=111751&view=rev
Log:
Fixing whitespace problems

Modified:
    libcxx/trunk/src/bind.cpp
    libcxx/trunk/src/chrono.cpp
    libcxx/trunk/src/exception.cpp
    libcxx/trunk/src/hash.cpp
    libcxx/trunk/src/ios.cpp
    libcxx/trunk/src/locale.cpp
    libcxx/trunk/src/memory.cpp
    libcxx/trunk/src/mutex.cpp
    libcxx/trunk/src/new.cpp
    libcxx/trunk/src/random.cpp
    libcxx/trunk/src/regex.cpp
    libcxx/trunk/src/string.cpp
    libcxx/trunk/src/strstream.cpp
    libcxx/trunk/src/system_error.cpp
    libcxx/trunk/src/thread.cpp
    libcxx/trunk/src/typeinfo.cpp

Modified: libcxx/trunk/src/bind.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/bind.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/bind.cpp (original)
+++ libcxx/trunk/src/bind.cpp Sat Aug 21 19:03:27 2010
@@ -27,5 +27,4 @@
 
 }  // placeholders
 
-
 _LIBCPP_END_NAMESPACE_STD

Modified: libcxx/trunk/src/chrono.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/chrono.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/chrono.cpp (original)
+++ libcxx/trunk/src/chrono.cpp Sat Aug 21 19:03:27 2010
@@ -15,7 +15,7 @@
 #include <cerrno>  // errno
 #include <system_error>  // __throw_system_error
 #include <time.h>  // clock_gettime, CLOCK_MONOTONIC
-#endif  /* __APPLE__ */
+#endif  // __APPLE__
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
@@ -103,7 +103,7 @@
     return time_point(duration(fp()));
 }
 
-#else  /* !APPLE */
+#else  // __APPLE__
 // FIXME: We assume that clock_gettime(CLOCK_MONOTONIC) works on
 // non-apple systems.  Instead, we should check _POSIX_TIMERS and
 // _POSIX_MONOTONIC_CLOCK and fall back to something else if those
@@ -121,7 +121,7 @@
         __throw_system_error(errno, "clock_gettime(CLOCK_MONOTONIC) failed");
     return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec));
 }
-#endif  /* APPLE */
+#endif  // __APPLE__
 
 }
 

Modified: libcxx/trunk/src/exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/exception.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/exception.cpp (original)
+++ libcxx/trunk/src/exception.cpp Sat Aug 21 19:03:27 2010
@@ -18,14 +18,12 @@
   // current unexpected handler are in the ABI library.
   #define __terminate_handler  __cxxabiapple::__cxa_terminate_handler
   #define __unexpected_handler __cxxabiapple::__cxa_unexpected_handler
-#else
+#else  // __APPLE__
   static std::terminate_handler  __terminate_handler;
   static std::unexpected_handler __unexpected_handler;
-#endif
-
-
+#endif  // __APPLE__
 
-std::unexpected_handler 
+std::unexpected_handler
 std::set_unexpected(std::unexpected_handler func) throw()
 {
     std::terminate_handler old = __unexpected_handler;
@@ -41,8 +39,7 @@
     std::terminate();
 }
 
-
-std::terminate_handler 
+std::terminate_handler
 std::set_terminate(std::terminate_handler func) throw()
 {
     std::terminate_handler old = __terminate_handler;
@@ -50,53 +47,49 @@
     return old;
 }
 
-
 void
 std::terminate()
 {
 #ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         (*__terminate_handler)();
         // handler should not return
         ::abort ();
 #ifndef _LIBCPP_NO_EXCEPTIONS
-    } 
+    }
     catch (...)
     {
         // handler should not throw exception
         ::abort ();
     }
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
-
 bool std::uncaught_exception() throw()
 {
 #if __APPLE__
 	// on Darwin, there is a helper function so __cxa_get_globals is private
     return __cxxabiapple::__cxa_uncaught_exception();
-#else
+#else  // __APPLE__
     #warning uncaught_exception not yet implemented
     ::abort();
     // Not provided by Ubuntu gcc-4.2.4's cxxabi.h.
     // __cxa_eh_globals * globals = __cxa_get_globals();
     // return (globals->uncaughtExceptions != 0);
-#endif
+#endif  // __APPLE__
 }
 
-
-namespace std 
+namespace std
 {
 
-
-exception::~exception() throw() 
-{ 
+exception::~exception() throw()
+{
 }
 
-bad_exception::~bad_exception() throw() 
-{ 
+bad_exception::~bad_exception() throw()
+{
 }
 
 const char* exception::what() const throw()
@@ -109,8 +102,6 @@
   return "std::bad_exception";
 }
 
-
-
 exception_ptr::~exception_ptr()
 {
 #if __APPLE__
@@ -118,7 +109,7 @@
 #else
 	#warning exception_ptr not yet implemented
 	::abort();
-#endif
+#endif  // __APPLE__
 }
 
 exception_ptr::exception_ptr(const exception_ptr& other)
@@ -129,7 +120,7 @@
 #else
 	#warning exception_ptr not yet implemented
 	::abort();
-#endif
+#endif  // __APPLE__
 }
 
 exception_ptr& exception_ptr::operator=(const exception_ptr& other)
@@ -142,10 +133,10 @@
 		__ptr_ = other.__ptr_;
 	}
     return *this;
-#else
+#else  // __APPLE__
 	#warning exception_ptr not yet implemented
 	::abort();
-#endif
+#endif  // __APPLE__
 }
 
 nested_exception::nested_exception()
@@ -167,30 +158,29 @@
 
 } // std
 
-
 std::exception_ptr std::current_exception()
 {
 #if __APPLE__
-	// be nicer if there was a constructor that took a ptr, then 
+	// be nicer if there was a constructor that took a ptr, then
 	// this whole function would be just:
 	//    return exception_ptr(__cxa_current_primary_exception());
     std::exception_ptr ptr;
 	ptr.__ptr_ = __cxxabiapple::__cxa_current_primary_exception();
 	return ptr;
-#else
+#else  // __APPLE__
 	#warning exception_ptr not yet implemented
 	::abort();
-#endif
+#endif  // __APPLE__
 }
 
 void std::rethrow_exception(exception_ptr p)
 {
 #if __APPLE__
-	__cxxabiapple::__cxa_rethrow_primary_exception(p.__ptr_); 
+	__cxxabiapple::__cxa_rethrow_primary_exception(p.__ptr_);
 	// if p.__ptr_ is NULL, above returns so we terminate
-    terminate(); 
-#else
+    terminate();
+#else  // __APPLE__
 	#warning exception_ptr not yet implemented
 	::abort();
-#endif
+#endif  // __APPLE__
 }

Modified: libcxx/trunk/src/hash.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/hash.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/hash.cpp (original)
+++ libcxx/trunk/src/hash.cpp Sat Aug 21 19:03:27 2010
@@ -126,14 +126,14 @@
 
 // Returns:  If n == 0, returns 0.  Else returns the lowest prime number that
 // is greater than or equal to n.
-// 
+//
 // The algorithm creates a list of small primes, plus an open-ended list of
 // potential primes.  All prime numbers are potential prime numbers.  However
 // some potential prime numbers are not prime.  In an ideal world, all potential
 // prime numbers would be prime.  Candiate prime numbers are chosen as the next
 // highest potential prime.  Then this number is tested for prime by dividing it
 // by all potential prime numbers less than the sqrt of the candidate.
-// 
+//
 // This implementation defines potential primes as those numbers not divisible
 // by 2, 3, 5, and 7.  Other (common) implementations define potential primes
 // as those not divisible by 2.  A few other implementations define potential

Modified: libcxx/trunk/src/ios.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/ios.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/ios.cpp (original)
+++ libcxx/trunk/src/ios.cpp Sat Aug 21 19:03:27 2010
@@ -263,7 +263,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     if (((state | (__rdbuf_ ? goodbit : badbit)) & __exceptions_) != 0)
         throw failure("ios_base::clear");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 // init
@@ -305,12 +305,12 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
         if (!new_callbacks)
             throw bad_alloc();
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         new_ints.reset((int*)malloc(sizeof(int) * rhs.__event_size_));
 #ifndef _LIBCPP_NO_EXCEPTIONS
         if (!new_ints)
             throw bad_alloc();
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (__iarray_cap_ < rhs.__iarray_size_)
     {
@@ -318,7 +318,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
         if (!new_longs)
             throw bad_alloc();
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (__parray_cap_ < rhs.__parray_size_)
     {
@@ -326,7 +326,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
         if (!new_pointers)
             throw bad_alloc();
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     // Got everything we need.  Copy everything but __rdstate_, __rdbuf_ and __exceptions_
     __fmtflags_ = rhs.__fmtflags_;
@@ -430,7 +430,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     if (__exceptions_ & badbit)
         throw;
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 void
@@ -440,7 +440,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     if (__exceptions_ & failbit)
         throw;
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 bool

Modified: libcxx/trunk/src/locale.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/locale.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/locale.cpp (original)
+++ libcxx/trunk/src/locale.cpp Sat Aug 21 19:03:27 2010
@@ -135,7 +135,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         facets_ = locale::classic().__locale_->facets_;
         for (unsigned i = 0; i < facets_.size(); ++i)
             if (facets_[i])
@@ -169,7 +169,7 @@
                 facets_[i]->__release_shared();
         throw;
     }
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 locale::__imp::__imp(const __imp& other)
@@ -193,7 +193,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         if (c & locale::collate)
         {
             install(new collate_byname<char>(name));
@@ -241,7 +241,7 @@
                 facets_[i]->__release_shared();
         throw;
     }
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 template<class F>
@@ -264,7 +264,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         if (c & locale::collate)
         {
             install_from<_STD::collate<char> >(one);
@@ -320,7 +320,7 @@
                 facets_[i]->__release_shared();
         throw;
     }
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 locale::__imp::__imp(const __imp& other, facet* f, long id)
@@ -361,7 +361,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     if (!has_facet(id))
         throw bad_cast();
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     return facets_[id];
 }
 
@@ -431,7 +431,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     : __locale_(name ? new __imp(name)
                      : throw runtime_error("locale constructed with null"))
-#else
+#else  // _LIBCPP_NO_EXCEPTIONS
     : __locale_(new __imp(name))
 #endif
 {
@@ -448,7 +448,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     : __locale_(name ? new __imp(*other.__locale_, name, c)
                      : throw runtime_error("locale constructed with null"))
-#else
+#else  // _LIBCPP_NO_EXCEPTIONS
     : __locale_(new __imp(*other.__locale_, name, c))
 #endif
 {
@@ -571,7 +571,7 @@
     if (__l == 0)
         throw runtime_error("collate_byname<char>::collate_byname"
                             " failed to construct for " + string(n));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 collate_byname<char>::collate_byname(const string& name, size_t refs)
@@ -582,7 +582,7 @@
     if (__l == 0)
         throw runtime_error("collate_byname<char>::collate_byname"
                             " failed to construct for " + name);
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 collate_byname<char>::~collate_byname()
@@ -623,7 +623,7 @@
     if (__l == 0)
         throw runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)"
                             " failed to construct for " + string(n));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 collate_byname<wchar_t>::collate_byname(const string& name, size_t refs)
@@ -634,7 +634,7 @@
     if (__l == 0)
         throw runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)"
                             " failed to construct for " + name);
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 collate_byname<wchar_t>::~collate_byname()
@@ -862,7 +862,7 @@
     if (__l == 0)
         throw runtime_error("ctype_byname<char>::ctype_byname"
                             " failed to construct for " + string(name));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 ctype_byname<char>::ctype_byname(const string& name, size_t refs)
@@ -873,7 +873,7 @@
     if (__l == 0)
         throw runtime_error("ctype_byname<char>::ctype_byname"
                             " failed to construct for " + name);
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 ctype_byname<char>::~ctype_byname()
@@ -919,7 +919,7 @@
     if (__l == 0)
         throw runtime_error("ctype_byname<wchar_t>::ctype_byname"
                             " failed to construct for " + string(name));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 ctype_byname<wchar_t>::ctype_byname(const string& name, size_t refs)
@@ -930,7 +930,7 @@
     if (__l == 0)
         throw runtime_error("ctype_byname<wchar_t>::ctype_byname"
                             " failed to construct for " + name);
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 ctype_byname<wchar_t>::~ctype_byname()
@@ -1057,15 +1057,15 @@
 
 // template <> class codecvt<char, char, mbstate_t>
 
-locale::id codecvt<char, char, mbstate_t>::id; 
+locale::id codecvt<char, char, mbstate_t>::id;
 
 codecvt<char, char, mbstate_t>::~codecvt()
 {
 }
 
 codecvt<char, char, mbstate_t>::result
-codecvt<char, char, mbstate_t>::do_out(state_type&, 
-    const intern_type* frm, const intern_type*, const intern_type*& frm_nxt, 
+codecvt<char, char, mbstate_t>::do_out(state_type&,
+    const intern_type* frm, const intern_type*, const intern_type*& frm_nxt,
     extern_type* to, extern_type*, extern_type*& to_nxt) const
 {
     frm_nxt = frm;
@@ -1074,8 +1074,8 @@
 }
 
 codecvt<char, char, mbstate_t>::result
-codecvt<char, char, mbstate_t>::do_in(state_type&, 
-    const extern_type* frm, const extern_type*, const extern_type*& frm_nxt, 
+codecvt<char, char, mbstate_t>::do_in(state_type&,
+    const extern_type* frm, const extern_type*, const extern_type*& frm_nxt,
     intern_type* to, intern_type*, intern_type*& to_nxt) const
 {
     frm_nxt = frm;
@@ -1084,7 +1084,7 @@
 }
 
 codecvt<char, char, mbstate_t>::result
-codecvt<char, char, mbstate_t>::do_unshift(state_type&, 
+codecvt<char, char, mbstate_t>::do_unshift(state_type&,
     extern_type* to, extern_type*, extern_type*& to_nxt) const
 {
     to_nxt = to;
@@ -1118,7 +1118,7 @@
 
 // template <> class codecvt<wchar_t, char, mbstate_t>
 
-locale::id codecvt<wchar_t, char, mbstate_t>::id; 
+locale::id codecvt<wchar_t, char, mbstate_t>::id;
 
 codecvt<wchar_t, char, mbstate_t>::codecvt(size_t refs)
     : locale::facet(refs),
@@ -1134,7 +1134,7 @@
     if (__l == 0)
         throw runtime_error("codecvt_byname<wchar_t, char, mbstate_t>::codecvt_byname"
                             " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 codecvt<wchar_t, char, mbstate_t>::~codecvt()
@@ -1145,7 +1145,7 @@
 
 codecvt<wchar_t, char, mbstate_t>::result
 codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
-    const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt, 
+    const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
     extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
 {
     // look for first internal null in frm
@@ -1201,7 +1201,7 @@
 
 codecvt<wchar_t, char, mbstate_t>::result
 codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
-    const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt, 
+    const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
     intern_type* to, intern_type* to_end, intern_type*& to_nxt) const
 {
     // look for first internal null in frm
@@ -2730,7 +2730,7 @@
 
 // template <> class codecvt<char16_t, char, mbstate_t>
 
-locale::id codecvt<char16_t, char, mbstate_t>::id; 
+locale::id codecvt<char16_t, char, mbstate_t>::id;
 
 codecvt<char16_t, char, mbstate_t>::~codecvt()
 {
@@ -2738,7 +2738,7 @@
 
 codecvt<char16_t, char, mbstate_t>::result
 codecvt<char16_t, char, mbstate_t>::do_out(state_type&,
-    const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt, 
+    const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
     extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
 {
     const uint16_t* _frm = reinterpret_cast<const uint16_t*>(frm);
@@ -2755,7 +2755,7 @@
 
 codecvt<char16_t, char, mbstate_t>::result
 codecvt<char16_t, char, mbstate_t>::do_in(state_type&,
-    const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt, 
+    const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
     intern_type* to, intern_type* to_end, intern_type*& to_nxt) const
 {
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
@@ -2807,7 +2807,7 @@
 
 // template <> class codecvt<char32_t, char, mbstate_t>
 
-locale::id codecvt<char32_t, char, mbstate_t>::id; 
+locale::id codecvt<char32_t, char, mbstate_t>::id;
 
 codecvt<char32_t, char, mbstate_t>::~codecvt()
 {
@@ -2815,7 +2815,7 @@
 
 codecvt<char32_t, char, mbstate_t>::result
 codecvt<char32_t, char, mbstate_t>::do_out(state_type&,
-    const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt, 
+    const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
     extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
 {
     const uint32_t* _frm = reinterpret_cast<const uint32_t*>(frm);
@@ -2832,7 +2832,7 @@
 
 codecvt<char32_t, char, mbstate_t>::result
 codecvt<char32_t, char, mbstate_t>::do_in(state_type&,
-    const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt, 
+    const extern_type* frm, const extern_type* frm_end, const extern_type*& frm_nxt,
     intern_type* to, intern_type* to_end, intern_type*& to_nxt) const
 {
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
@@ -3876,7 +3876,7 @@
         if (loc == 0)
             throw runtime_error("numpunct_byname<char>::numpunct_byname"
                                 " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         lconv* lc = localeconv_l(loc.get());
         if (*lc->decimal_point)
             __decimal_point_ = *lc->decimal_point;
@@ -3915,7 +3915,7 @@
         if (loc == 0)
             throw runtime_error("numpunct_byname<char>::numpunct_byname"
                                 " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         lconv* lc = localeconv_l(loc.get());
         if (*lc->decimal_point)
             __decimal_point_ = *lc->decimal_point;
@@ -4322,7 +4322,7 @@
     if (__loc_ == 0)
         throw runtime_error("time_get_byname"
                             " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 __time_get::__time_get(const string& nm)
@@ -4332,7 +4332,7 @@
     if (__loc_ == 0)
         throw runtime_error("time_get_byname"
                             " failed to construct for " + nm);
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 __time_get::~__time_get()
@@ -4973,7 +4973,7 @@
     if (__loc_ == 0)
         throw runtime_error("time_put_byname"
                             " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 __time_put::__time_put(const string& nm)
@@ -4983,7 +4983,7 @@
     if (__loc_ == 0)
         throw runtime_error("time_put_byname"
                             " failed to construct for " + nm);
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 __time_put::~__time_put()
@@ -5266,7 +5266,7 @@
     if (loc == 0)
         throw runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     lconv* lc = localeconv_l(loc.get());
     if (*lc->mon_decimal_point)
         __decimal_point_ = *lc->mon_decimal_point;
@@ -5304,7 +5304,7 @@
     if (loc == 0)
         throw runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     lconv* lc = localeconv_l(loc.get());
     if (*lc->mon_decimal_point)
         __decimal_point_ = *lc->mon_decimal_point;
@@ -5342,7 +5342,7 @@
     if (loc == 0)
         throw runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     lconv* lc = localeconv_l(loc.get());
     if (*lc->mon_decimal_point)
         __decimal_point_ = static_cast<wchar_t>(*lc->mon_decimal_point);
@@ -5403,7 +5403,7 @@
     if (loc == 0)
         throw runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     lconv* lc = localeconv_l(loc.get());
     if (*lc->mon_decimal_point)
         __decimal_point_ = static_cast<wchar_t>(*lc->mon_decimal_point);
@@ -5526,4 +5526,4 @@
 template class __vector_base_common<true>;
 
 _LIBCPP_END_NAMESPACE_STD
-#endif  /* __APPLE__ */
+#endif  // __APPLE__

Modified: libcxx/trunk/src/memory.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/memory.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/memory.cpp (original)
+++ libcxx/trunk/src/memory.cpp Sat Aug 21 19:03:27 2010
@@ -30,7 +30,6 @@
 
 }  // namespace
 
-
 const allocator_arg_t allocator_arg = allocator_arg_t();
 
 bad_weak_ptr::~bad_weak_ptr() throw() {}
@@ -115,7 +114,7 @@
     return 0;
 }
 
-#endif
+#endif  // _LIBCPP_NO_RTTI
 
 void
 declare_reachable(void*)

Modified: libcxx/trunk/src/mutex.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/mutex.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/mutex.cpp (original)
+++ libcxx/trunk/src/mutex.cpp Sat Aug 21 19:03:27 2010
@@ -223,7 +223,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
         try
         {
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
             flag = 1;
             pthread_mutex_unlock(&mut);
             func(arg);
@@ -241,7 +241,7 @@
             pthread_cond_broadcast(&cv);
             throw;
         }
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     else
         pthread_mutex_unlock(&mut);

Modified: libcxx/trunk/src/new.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/new.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/new.cpp (original)
+++ libcxx/trunk/src/new.cpp Sat Aug 21 19:03:27 2010
@@ -11,23 +11,20 @@
 
 #include "new"
 
-
 #if __APPLE__
-    #include <cxxabi.h> 
+    #include <cxxabi.h>
     // On Darwin, there are two STL shared libraries and a lower level ABI
 	// shared libray.  The global holding the current new handler is
     // in the ABI library and named __cxa_new_handler.
     #define __new_handler __cxxabiapple::__cxa_new_handler
-#else
+#else  // __APPLE__
 	static std::new_handler __new_handler;
 #endif
 
-
 // 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.
 
-
 __attribute__((__weak__, __visibility__("default")))
 void *
 operator new(std::size_t size) throw (std::bad_alloc)
@@ -37,7 +34,7 @@
     void* p;
     while ((p = ::malloc(size)) == 0)
     {
-		// If malloc fails and there is a new_handler, 
+		// If malloc fails and there is a new_handler,
 		// call it to try free up memory.
         if (__new_handler)
             __new_handler();
@@ -59,14 +56,14 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         p = ::operator new(size);
 #ifndef _LIBCPP_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     return p;
 }
 
@@ -85,14 +82,14 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     try
     {
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
         p = ::operator new[](size);
 #ifndef _LIBCPP_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     return p;
 }
 
@@ -111,7 +108,6 @@
     ::operator delete(ptr);
 }
 
-
 __attribute__((__weak__, __visibility__("default")))
 void
 operator delete[] (void* ptr) throw ()
@@ -126,7 +122,6 @@
     ::operator delete[](ptr);
 }
 
-
 namespace std
 {
 
@@ -140,21 +135,20 @@
     return r;
 }
 
-bad_alloc::bad_alloc() throw() 
-{ 
+bad_alloc::bad_alloc() throw()
+{
 }
 
-bad_alloc::~bad_alloc() throw() 
-{ 
+bad_alloc::~bad_alloc() throw()
+{
 }
 
-const char* 
+const char*
 bad_alloc::what() const throw()
 {
     return "std::bad_alloc";
 }
 
-
 bad_array_new_length::bad_array_new_length() throw()
 {
 }
@@ -169,8 +163,6 @@
     return "bad_array_new_length";
 }
 
-
-
 void
 __throw_bad_alloc()
 {

Modified: libcxx/trunk/src/random.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/random.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/random.cpp (original)
+++ libcxx/trunk/src/random.cpp Sat Aug 21 19:03:27 2010
@@ -14,7 +14,6 @@
 #include <unistd.h>
 #include <errno.h>
 
-
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 random_device::random_device(const string& __token)

Modified: libcxx/trunk/src/regex.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/regex.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/regex.cpp (original)
+++ libcxx/trunk/src/regex.cpp Sat Aug 21 19:03:27 2010
@@ -312,6 +312,4 @@
     }
 }
 
-
-
 _LIBCPP_END_NAMESPACE_STD

Modified: libcxx/trunk/src/string.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/string.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/string.cpp (original)
+++ libcxx/trunk/src/string.cpp Sat Aug 21 19:03:27 2010
@@ -83,7 +83,7 @@
         if (r == 0)
             throw invalid_argument("stoi: no conversion");
         throw out_of_range("stoi: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -104,7 +104,7 @@
         if (r == 0)
             throw invalid_argument("stoi: no conversion");
         throw out_of_range("stoi: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -123,7 +123,7 @@
         if (r == 0)
             throw invalid_argument("stol: no conversion");
         throw out_of_range("stol: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -142,7 +142,7 @@
         if (r == 0)
             throw invalid_argument("stol: no conversion");
         throw out_of_range("stol: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -161,7 +161,7 @@
         if (r == 0)
             throw invalid_argument("stoul: no conversion");
         throw out_of_range("stoul: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -180,7 +180,7 @@
         if (r == 0)
             throw invalid_argument("stoul: no conversion");
         throw out_of_range("stoul: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -199,7 +199,7 @@
         if (r == 0)
             throw invalid_argument("stoll: no conversion");
         throw out_of_range("stoll: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -218,7 +218,7 @@
         if (r == 0)
             throw invalid_argument("stoll: no conversion");
         throw out_of_range("stoll: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -237,7 +237,7 @@
         if (r == 0)
             throw invalid_argument("stoull: no conversion");
         throw out_of_range("stoull: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -256,7 +256,7 @@
         if (r == 0)
             throw invalid_argument("stoull: no conversion");
         throw out_of_range("stoull: out of range");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     }
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
@@ -277,7 +277,7 @@
         throw out_of_range("stof: out of range");
     if (ptr == p)
         throw invalid_argument("stof: no conversion");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return static_cast<float>(r);
@@ -297,7 +297,7 @@
         throw out_of_range("stof: out of range");
     if (ptr == p)
         throw invalid_argument("stof: no conversion");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return static_cast<float>(r);
@@ -317,7 +317,7 @@
         throw out_of_range("stod: out of range");
     if (ptr == p)
         throw invalid_argument("stod: no conversion");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return r;
@@ -337,7 +337,7 @@
         throw out_of_range("stod: out of range");
     if (ptr == p)
         throw invalid_argument("stod: no conversion");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return r;
@@ -357,7 +357,7 @@
         throw out_of_range("stold: out of range");
     if (ptr == p)
         throw invalid_argument("stold: no conversion");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return r;
@@ -377,7 +377,7 @@
         throw out_of_range("stold: out of range");
     if (ptr == p)
         throw invalid_argument("stold: no conversion");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     if (idx)
         *idx = static_cast<size_t>(ptr - p);
     return r;

Modified: libcxx/trunk/src/strstream.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/strstream.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/strstream.cpp (original)
+++ libcxx/trunk/src/strstream.cpp Sat Aug 21 19:03:27 2010
@@ -132,7 +132,7 @@
     __rhs.setp(nullptr, nullptr);
 }
 
-#endif
+#endif  // _LIBCPP_MOVE
 
 strstreambuf::~strstreambuf()
 {
@@ -257,7 +257,6 @@
     return int_type((unsigned char)*gptr());
 }
 
-
 strstreambuf::pos_type
 strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __which)
 {
@@ -316,7 +315,6 @@
     return pos_type(__p);
 }
 
-
 strstreambuf::pos_type
 strstreambuf::seekpos(pos_type __sp, ios_base::openmode __which)
 {

Modified: libcxx/trunk/src/system_error.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/system_error.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/system_error.cpp (original)
+++ libcxx/trunk/src/system_error.cpp Sat Aug 21 19:03:27 2010
@@ -67,7 +67,7 @@
 #ifdef ELAST
     if (ev > ELAST)
       return string("unspecified generic_category error");
-#endif
+#endif  // ELAST
     return __do_message::message(ev);
 }
 
@@ -99,7 +99,7 @@
 #ifdef ELAST
     if (ev > ELAST)
       return string("unspecified system_category error");
-#endif
+#endif  // ELAST
     return __do_message::message(ev);
 }
 
@@ -109,7 +109,7 @@
 #ifdef ELAST
     if (ev > ELAST)
       return error_condition(ev, system_category());
-#endif
+#endif  // ELAST
     return error_condition(ev, generic_category());
 }
 

Modified: libcxx/trunk/src/thread.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/thread.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/thread.cpp (original)
+++ libcxx/trunk/src/thread.cpp Sat Aug 21 19:03:27 2010
@@ -27,7 +27,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     if (ec)
         throw system_error(error_code(ec, system_category()), "thread::join failed");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
     __t_ = 0;
 }
 
@@ -44,7 +44,7 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     if (ec)
         throw system_error(error_code(ec, system_category()), "thread::detach failed");
-#endif
+#endif  // _LIBCPP_NO_EXCEPTIONS
 }
 
 unsigned
@@ -56,11 +56,11 @@
     std::size_t s = sizeof(n);
     sysctl(mib, 2, &n, &s, 0, 0);
     return n;
-#else  // !defined(CTL_HW && HW_NCPU)
+#else  // defined(CTL_HW) && defined(HW_NCPU)
     // TODO: grovel through /proc or check cpuid on x86 and similar
     // instructions on other architectures.
     return 0;  // Means not computable [thread.thread.static]
-#endif
+#endif  // defined(CTL_HW) && defined(HW_NCPU)
 }
 
 namespace this_thread

Modified: libcxx/trunk/src/typeinfo.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/typeinfo.cpp?rev=111751&r1=111750&r2=111751&view=diff
==============================================================================
--- libcxx/trunk/src/typeinfo.cpp (original)
+++ libcxx/trunk/src/typeinfo.cpp Sat Aug 21 19:03:27 2010
@@ -10,32 +10,30 @@
 
 #include "typeinfo"
 
-std::bad_cast::bad_cast() throw() 
-{ 
+std::bad_cast::bad_cast() throw()
+{
 }
 
-std::bad_cast::~bad_cast() throw() 
-{ 
+std::bad_cast::~bad_cast() throw()
+{
 }
 
-const char* 
+const char*
 std::bad_cast::what() const throw()
 {
   return "std::bad_cast";
 }
 
-
-std::bad_typeid::bad_typeid() throw() 
-{ 
+std::bad_typeid::bad_typeid() throw()
+{
 }
 
-std::bad_typeid::~bad_typeid() throw() 
+std::bad_typeid::~bad_typeid() throw()
 {
 }
 
-const char* 
+const char*
 std::bad_typeid::what() const throw()
 {
   return "std::bad_typeid";
 }
-





More information about the cfe-commits mailing list