[llvm-commits] [test-suite] r120714 - in /test-suite/trunk/SingleSource/UnitTests: black-copied-in-cxxobj.cpp block-copied-in-cxxobj.cpp

Fariborz Jahanian fjahanian at apple.com
Thu Dec 2 09:09:20 PST 2010


Author: fjahanian
Date: Thu Dec  2 11:09:20 2010
New Revision: 120714

URL: http://llvm.org/viewvc/llvm-project?rev=120714&view=rev
Log:
Corrected test file name.

Added:
    test-suite/trunk/SingleSource/UnitTests/block-copied-in-cxxobj.cpp
      - copied unchanged from r119159, test-suite/trunk/SingleSource/UnitTests/black-copied-in-cxxobj.cpp
Removed:
    test-suite/trunk/SingleSource/UnitTests/black-copied-in-cxxobj.cpp

Removed: test-suite/trunk/SingleSource/UnitTests/black-copied-in-cxxobj.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/black-copied-in-cxxobj.cpp?rev=120713&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/black-copied-in-cxxobj.cpp (original)
+++ test-suite/trunk/SingleSource/UnitTests/black-copied-in-cxxobj.cpp (removed)
@@ -1,48 +0,0 @@
-#if defined(__BLOCKS__) && defined(__clang__)
-// rdar://8594790
-#include <Block.h>
-
-extern "C" void abort();
-
-int count = 100;
-int no=1;
-
-struct S {
-  S() { no = 0; };
-  ~S() { if (no != 0) abort(); }
-};
-
-static S s1;
-
-class A {
-public:
-        int x;
-        A(const A &o) { ++no; x = o.x; }
-        A &operator =(const A &o) { x = o.x; return *this; }
-        A() : x(count++) { ++no; }
-        virtual ~A() { --no; }
-        void hello() const { }
-};
-#endif
-
-int
-main()
-{
-#if defined(__BLOCKS__) && defined(__clang__)
-        A a;
-        A a1;
-        A a2;
-        void (^b)(void) = ^{ a.hello(); a1.hello(); a2.hello(); };
-        b();
-
-        void (^c)(void) = Block_copy(^{ a.hello(); a1.hello(); a2.hello(); });
-        c();
-	if (no != 12)
-	  abort();
-        Block_release(c);
-	if (no != 9)
-	  abort();
-#endif
-        return 0;
-}
-





More information about the llvm-commits mailing list