[cfe-commits] r104253 - in /cfe/trunk/test/CodeGenObjC: objc2-new-gc-api-strongcast.m objc2-no-write-barrier.m objc2-retain-codegen.m objc2-strong-cast-1.m objc2-strong-cast.m objc2-weak-assign.m objc2-weak-compare.m objc2-weak-ivar-debug.m objc2-weak-ivar.m objc2-write-barrier-2.m objc2-write-barrier-3.m objc2-write-barrier-4.m objc2-write-barrier-5.m objc2-write-barrier.m

Fariborz Jahanian fjahanian at apple.com
Thu May 20 11:22:28 PDT 2010


Author: fjahanian
Date: Thu May 20 13:22:28 2010
New Revision: 104253

URL: http://llvm.org/viewvc/llvm-project?rev=104253&view=rev
Log:
More Objective-C++ GC tests.


Modified:
    cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
    cfe/trunk/test/CodeGenObjC/objc2-no-write-barrier.m
    cfe/trunk/test/CodeGenObjC/objc2-retain-codegen.m
    cfe/trunk/test/CodeGenObjC/objc2-strong-cast-1.m
    cfe/trunk/test/CodeGenObjC/objc2-strong-cast.m
    cfe/trunk/test/CodeGenObjC/objc2-weak-assign.m
    cfe/trunk/test/CodeGenObjC/objc2-weak-compare.m
    cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m
    cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m
    cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m
    cfe/trunk/test/CodeGenObjC/objc2-write-barrier-3.m
    cfe/trunk/test/CodeGenObjC/objc2-write-barrier-4.m
    cfe/trunk/test/CodeGenObjC/objc2-write-barrier-5.m
    cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m

Modified: cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-new-gc-api-strongcast.m Thu May 20 13:22:28 2010
@@ -1,9 +1,11 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep -F '@objc_assign_strongCast' %t  | count 4
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fblocks -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep -F '@objc_assign_strongCast' %t  | count 4
 
 @interface DSATextSearch @end
 
-DSATextSearch **_uniqueIdToIdentifierArray = ((void *)0);
+DSATextSearch **_uniqueIdToIdentifierArray = (0);
 void foo (int _nextId)
 {
 	_uniqueIdToIdentifierArray[_nextId] = 0;  // objc_assign_strongCast

Modified: cfe/trunk/test/CodeGenObjC/objc2-no-write-barrier.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-no-write-barrier.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-no-write-barrier.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-no-write-barrier.m Thu May 20 13:22:28 2010
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep 'objc_assign' %t | count 0
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep 'objc_assign' %t | count 0
 
 typedef struct {
     int ival;

Modified: cfe/trunk/test/CodeGenObjC/objc2-retain-codegen.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-retain-codegen.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-retain-codegen.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-retain-codegen.m Thu May 20 13:22:28 2010
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fobjc-gc-only -emit-llvm -o %t %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-unknown-unknown -fobjc-gc-only -emit-llvm -o %t %s
 
 @interface I0 {
   I0 *_f0;

Modified: cfe/trunk/test/CodeGenObjC/objc2-strong-cast-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-strong-cast-1.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-strong-cast-1.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-strong-cast-1.m Thu May 20 13:22:28 2010
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s
 
 @interface I {
   __attribute__((objc_gc(strong))) int *i_IdocumentIDs;

Modified: cfe/trunk/test/CodeGenObjC/objc2-strong-cast.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-strong-cast.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-strong-cast.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-strong-cast.m Thu May 20 13:22:28 2010
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -fobjc-gc -emit-llvm -o %t %s
+// RUN: %clang_cc1 -x objective-c++ -fobjc-gc -emit-llvm -o %t %s
 
 @interface I {
   __attribute__((objc_gc(strong))) signed long *_documentIDs;

Modified: cfe/trunk/test/CodeGenObjC/objc2-weak-assign.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-weak-assign.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-weak-assign.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-weak-assign.m Thu May 20 13:22:28 2010
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6
 
 __weak id* x;
 id* __weak y;

Modified: cfe/trunk/test/CodeGenObjC/objc2-weak-compare.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-weak-compare.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-weak-compare.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-weak-compare.m Thu May 20 13:22:28 2010
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
+// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
 
 @interface PBXTarget 
 {
@@ -10,6 +11,7 @@
 - Meth;
 @end
 
+extern void foo();
 @implementation PBXTarget
 - Meth {
 	if (_lastKnownTarget != result)

Modified: cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-weak-ivar-debug.m Thu May 20 13:22:28 2010
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -g -emit-llvm -o - %s
 // RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -g -emit-llvm -o - %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-gc -g -emit-llvm -o - %s
+// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fobjc-gc -g -emit-llvm -o - %s
 
 // rdar://7252252
 @interface Loop {

Modified: cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m Thu May 20 13:22:28 2010
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
 @class NSObject;
 
 @interface Foo  {

Modified: cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-write-barrier-2.m Thu May 20 13:22:28 2010
@@ -2,6 +2,10 @@
 // RUN: grep -F '@objc_assign_global' %t  | count 7
 // RUN: grep -F '@objc_assign_ivar' %t  | count 5
 // RUN: grep -F '@objc_assign_strongCast' %t  | count 8
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep -F '@objc_assign_global' %t  | count 7
+// RUN: grep -F '@objc_assign_ivar' %t  | count 5
+// RUN: grep -F '@objc_assign_strongCast' %t  | count 8
 
 extern id **somefunc(void);
 extern id *somefunc2(void);

Modified: cfe/trunk/test/CodeGenObjC/objc2-write-barrier-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-write-barrier-3.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-write-barrier-3.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-write-barrier-3.m Thu May 20 13:22:28 2010
@@ -1,6 +1,9 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep objc_assign_ivar %t | count 3
 // RUN: grep objc_assign_strongCast %t | count 6
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep objc_assign_ivar %t | count 3
+// RUN: grep objc_assign_strongCast %t | count 6
 
 struct Slice {
     void *__strong * items;

Modified: cfe/trunk/test/CodeGenObjC/objc2-write-barrier-4.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-write-barrier-4.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-write-barrier-4.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-write-barrier-4.m Thu May 20 13:22:28 2010
@@ -1,6 +1,9 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep objc_assign_global %t | count 3
 // RUN: grep objc_assign_strongCast %t | count 2
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep objc_assign_global %t | count 3
+// RUN: grep objc_assign_strongCast %t | count 2
 
 @interface A
 @end

Modified: cfe/trunk/test/CodeGenObjC/objc2-write-barrier-5.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-write-barrier-5.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-write-barrier-5.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-write-barrier-5.m Thu May 20 13:22:28 2010
@@ -1,6 +1,9 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep objc_assign_ivar %t | count 0
 // RUN: grep objc_assign_strongCast %t | count 5
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep objc_assign_ivar %t | count 0
+// RUN: grep objc_assign_strongCast %t | count 5
 
 @interface TestUnarchiver 
 {

Modified: cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m?rev=104253&r1=104252&r2=104253&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc2-write-barrier.m Thu May 20 13:22:28 2010
@@ -1,6 +1,9 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
 // RUN: grep -F '@objc_assign_global' %t  | count 21
 // RUN: grep -F '@objc_assign_ivar' %t  | count 11
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep -F '@objc_assign_global' %t  | count 21
+// RUN: grep -F '@objc_assign_ivar' %t  | count 11
 
 
 typedef const struct __CFDictionary * CFDictionaryRef;
@@ -49,9 +52,9 @@
 
 
 // The test cases
-void *rhs = 0;
+void* rhs = 0;
 
-#define ASSIGNTEST(expr, global) expr = rhs
+#define ASSIGNTEST(expr, global) expr = (typeof(expr))rhs
 
 int testGlobals() {
   // Everything in this function generates assign_global intercepts





More information about the cfe-commits mailing list