[cfe-commits] [libcxx] r111778 - in /libcxx/trunk: include/new src/exception.cpp src/new.cpp test/language.support/support.exception/exception.unexpected/set.unexpected/set_unexpected.pass.cpp

Howard Hinnant hhinnant at apple.com
Sun Aug 22 06:53:14 PDT 2010


Author: hhinnant
Date: Sun Aug 22 08:53:14 2010
New Revision: 111778

URL: http://llvm.org/viewvc/llvm-project?rev=111778&view=rev
Log:
Remove tabs

Modified:
    libcxx/trunk/include/new
    libcxx/trunk/src/exception.cpp
    libcxx/trunk/src/new.cpp
    libcxx/trunk/test/language.support/support.exception/exception.unexpected/set.unexpected/set_unexpected.pass.cpp

Modified: libcxx/trunk/include/new
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/new?rev=111778&r1=111777&r2=111778&view=diff
==============================================================================
--- libcxx/trunk/include/new (original)
+++ libcxx/trunk/include/new Sun Aug 22 08:53:14 2010
@@ -65,7 +65,7 @@
     : public exception
 {
 public:
-	bad_alloc() throw();
+    bad_alloc() throw();
     virtual ~bad_alloc() throw();
     virtual const char* what() const throw();
 };

Modified: libcxx/trunk/src/exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/exception.cpp?rev=111778&r1=111777&r2=111778&view=diff
==============================================================================
--- libcxx/trunk/src/exception.cpp (original)
+++ libcxx/trunk/src/exception.cpp Sun Aug 22 08:53:14 2010
@@ -35,7 +35,7 @@
 std::unexpected()
 {
     (*__unexpected_handler)();
-	// unexpected handler should not return
+    // unexpected handler should not return
     std::terminate();
 }
 
@@ -70,7 +70,7 @@
 bool std::uncaught_exception() throw()
 {
 #if __APPLE__
-	// on Darwin, there is a helper function so __cxa_get_globals is private
+    // on Darwin, there is a helper function so __cxa_get_globals is private
     return __cxxabiapple::__cxa_uncaught_exception();
 #else  // __APPLE__
     #warning uncaught_exception not yet implemented
@@ -107,8 +107,8 @@
 #if __APPLE__
     __cxxabiapple::__cxa_decrement_exception_refcount(__ptr_);
 #else
-	#warning exception_ptr not yet implemented
-	::abort();
+    #warning exception_ptr not yet implemented
+    ::abort();
 #endif  // __APPLE__
 }
 
@@ -118,8 +118,8 @@
 #if __APPLE__
     __cxxabiapple::__cxa_increment_exception_refcount(__ptr_);
 #else
-	#warning exception_ptr not yet implemented
-	::abort();
+    #warning exception_ptr not yet implemented
+    ::abort();
 #endif  // __APPLE__
 }
 
@@ -130,12 +130,12 @@
     {
         __cxxabiapple::__cxa_increment_exception_refcount(other.__ptr_);
         __cxxabiapple::__cxa_decrement_exception_refcount(__ptr_);
-		__ptr_ = other.__ptr_;
-	}
+        __ptr_ = other.__ptr_;
+    }
     return *this;
 #else  // __APPLE__
-	#warning exception_ptr not yet implemented
-	::abort();
+    #warning exception_ptr not yet implemented
+    ::abort();
 #endif  // __APPLE__
 }
 
@@ -161,26 +161,26 @@
 std::exception_ptr std::current_exception()
 {
 #if __APPLE__
-	// 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());
+    // 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;
+    ptr.__ptr_ = __cxxabiapple::__cxa_current_primary_exception();
+    return ptr;
 #else  // __APPLE__
-	#warning exception_ptr not yet implemented
-	::abort();
+    #warning exception_ptr not yet implemented
+    ::abort();
 #endif  // __APPLE__
 }
 
 void std::rethrow_exception(exception_ptr p)
 {
 #if __APPLE__
-	__cxxabiapple::__cxa_rethrow_primary_exception(p.__ptr_);
-	// if p.__ptr_ is NULL, above returns so we terminate
+    __cxxabiapple::__cxa_rethrow_primary_exception(p.__ptr_);
+    // if p.__ptr_ is NULL, above returns so we terminate
     terminate();
 #else  // __APPLE__
-	#warning exception_ptr not yet implemented
-	::abort();
+    #warning exception_ptr not yet implemented
+    ::abort();
 #endif  // __APPLE__
 }

Modified: libcxx/trunk/src/new.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/new.cpp?rev=111778&r1=111777&r2=111778&view=diff
==============================================================================
--- libcxx/trunk/src/new.cpp (original)
+++ libcxx/trunk/src/new.cpp Sun Aug 22 08:53:14 2010
@@ -14,11 +14,11 @@
 #if __APPLE__
     #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
+    // 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  // __APPLE__
-	static std::new_handler __new_handler;
+    static std::new_handler __new_handler;
 #endif
 
 // Implement all new and delete operators as weak definitions
@@ -34,8 +34,8 @@
     void* p;
     while ((p = ::malloc(size)) == 0)
     {
-		// If malloc fails and there is a new_handler,
-		// call it to try free up memory.
+        // If malloc fails and there is a new_handler,
+        // call it to try free up memory.
         if (__new_handler)
             __new_handler();
         else

Modified: libcxx/trunk/test/language.support/support.exception/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/language.support/support.exception/exception.unexpected/set.unexpected/set_unexpected.pass.cpp?rev=111778&r1=111777&r2=111778&view=diff
==============================================================================
--- libcxx/trunk/test/language.support/support.exception/exception.unexpected/set.unexpected/set_unexpected.pass.cpp (original)
+++ libcxx/trunk/test/language.support/support.exception/exception.unexpected/set.unexpected/set_unexpected.pass.cpp Sun Aug 22 08:53:14 2010
@@ -23,13 +23,13 @@
 
 int main()
 {
-	std::unexpected_handler old = std::set_unexpected(f1);
+    std::unexpected_handler old = std::set_unexpected(f1);
     // verify there is a previous unexpected handler
-	assert(old);
-	// verify f1 was replace with f2
+    assert(old);
+    // verify f1 was replace with f2
     assert(std::set_unexpected(f2) == f1);
-	// verify calling original unexpected handler calls terminate
-	std::set_terminate(f3);
-	(*old)();
-	assert(0);
+    // verify calling original unexpected handler calls terminate
+    std::set_terminate(f3);
+    (*old)();
+    assert(0);
 }





More information about the cfe-commits mailing list