aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-09-08 23:38:54 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-09-08 23:38:54 +0000
commit7f4f86a2167abc116275e49c81350fc3225485e5 (patch)
treea238134fc0c9ef5f9b61a8431c9578917dd88bc6 /test/CodeGenObjC
parent7ef7f133dee7c2d5cfc97a9f6aa6dbc45435cb7b (diff)
More objc GC's API work for array of pointers declared
as __strong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC')
-rw-r--r--test/CodeGenObjC/objc2-strong-cast-4.m20
1 files changed, 16 insertions, 4 deletions
diff --git a/test/CodeGenObjC/objc2-strong-cast-4.m b/test/CodeGenObjC/objc2-strong-cast-4.m
index e351f48477..350b2b0bed 100644
--- a/test/CodeGenObjC/objc2-strong-cast-4.m
+++ b/test/CodeGenObjC/objc2-strong-cast-4.m
@@ -1,5 +1,5 @@
// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s &&
-// RUN: grep objc_assign_strongCast %t | count 3 &&
+// RUN: grep objc_assign_strongCast %t | count 7 &&
// RUN: true
struct Slice {
@@ -10,14 +10,26 @@ typedef struct Slice Slice;
@interface ISlice {
@public
- void *__strong * items;
+ void *__strong * IvarItem;
}
@end
-void foo () {
+void foo (int i) {
+ // storing into an array of strong pointer types.
+ void *__strong* items;
+ items[i] = 0;
+
+ // storing indirectly into an array of strong pointer types.
+ void *__strong* *vitems;
+ *vitems[i] = 0;
+
Slice *slice;
slice->items = 0;
+ // storing into a struct element of an array of strong pointer types.
+ slice->items[i] = 0;
ISlice *islice;
- islice->items = 0;
+ islice->IvarItem = 0;
+ // Storing into an ivar of an array of strong pointer types.
+ islice->IvarItem[i] = (void*)0;
}