summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-03 21:11:25 +0000
committered <ed@FreeBSD.org>2009-06-03 21:11:25 +0000
commit9e262ca77e924f9d84a864b031a1b931d03c5e38 (patch)
treef0e24d4185187f7d15274dee4bc53908e30f5b76 /test/CodeGenObjC
parent48ecc7affef226b2bac1e08bdfdc059306a1734c (diff)
downloadFreeBSD-src-9e262ca77e924f9d84a864b031a1b931d03c5e38.zip
FreeBSD-src-9e262ca77e924f9d84a864b031a1b931d03c5e38.tar.gz
Import Clang, at r72805.
Diffstat (limited to 'test/CodeGenObjC')
-rw-r--r--test/CodeGenObjC/objc2-weak-assign.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGenObjC/objc2-weak-assign.m b/test/CodeGenObjC/objc2-weak-assign.m
new file mode 100644
index 0000000..a3740b2
--- /dev/null
+++ b/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;
+}
+
OpenPOWER on IntegriCloud