diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-06-03 17:15:17 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-06-03 17:15:17 +0000 |
commit | b68215c4dea3d515b8f0305a8c10aaa89d6bbdb5 (patch) | |
tree | 0b6da130888a9fa7ffd9400ffc7f13c8e1487e1b /clang/test/CodeGenObjC/objc2-weak-assign.m | |
parent | 2f04887220f0b3eff5ca83c4c67a8f2d59a1d1cb (diff) | |
download | bcm5719-llvm-b68215c4dea3d515b8f0305a8c10aaa89d6bbdb5.tar.gz bcm5719-llvm-b68215c4dea3d515b8f0305a8c10aaa89d6bbdb5.zip |
Place the GC attribute on the same relative pointer
position to make it consistant and to match gcc's behavior,
by placing it at the inner-most pointer.
llvm-svn: 72784
Diffstat (limited to 'clang/test/CodeGenObjC/objc2-weak-assign.m')
-rw-r--r-- | clang/test/CodeGenObjC/objc2-weak-assign.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/objc2-weak-assign.m b/clang/test/CodeGenObjC/objc2-weak-assign.m new file mode 100644 index 00000000000..a3740b207e8 --- /dev/null +++ b/clang/test/CodeGenObjC/objc2-weak-assign.m @@ -0,0 +1,22 @@ +// RUN: clang-cc -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; +id* __weak* z; + +__weak id* a1[20]; +id* __weak a2[30]; +id** __weak a3[40]; + +int main() +{ + *x = 0; + *y = 0; + **z = 0; + + a1[3] = 0; + a2[3] = 0; + a3[3][4] = 0; +} + |