[cfe-commits] r82092 - /cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m

Fariborz Jahanian fjahanian at apple.com
Wed Sep 16 16:38:27 PDT 2009


Author: fjahanian
Date: Wed Sep 16 18:38:26 2009
New Revision: 82092

URL: http://llvm.org/viewvc/llvm-project?rev=82092&view=rev
Log:
Additional tests for write-bariers.


Modified:
    cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m

Modified: cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m?rev=82092&r1=82091&r2=82092&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m (original)
+++ cfe/trunk/test/CodeGenObjC/objc-assign-ivar.m Wed Sep 16 18:38:26 2009
@@ -1,5 +1,5 @@
 // RUN: clang-cc -fnext-runtime -fobjc-gc -fobjc-newgc-api -emit-llvm -o %t %s &&
-// RUN: grep -F '@objc_assign_ivar' %t  | count 11 &&
+// RUN: grep -F '@objc_assign_ivar' %t  | count 14 &&
 // RUN: true
 
 typedef struct {
@@ -22,6 +22,9 @@
   id nsobject;
   NSString *stringArray[10];
   struct_with_ids_t inner;
+
+  Foo *obj[20];
+  short idx[5];
 }
 @end
 
@@ -42,6 +45,10 @@
   ASSIGNTEST(foo->inner.elementArray[0], IvarAssigns);                  // objc_assign_ivar
   ASSIGNTEST(foo->inner.cfElement, IvarAssigns);                        // objc_assign_ivar
   ASSIGNTEST(foo->inner.cfElementArray[0], IvarAssigns);                // objc_assign_ivar
-
+  int counter=1;
+  ASSIGNTEST(foo->obj[5], IvarAssigns);                 // objc_assign_ivar
+  ASSIGNTEST(foo->obj[++counter], IvarAssigns);         // objc_assign_ivar
+  foo->idx[++counter] = 15;
+  ASSIGNTEST(foo->obj[foo->idx[2]], IvarAssigns);       // objc_assign_ivar
 }
 





More information about the cfe-commits mailing list