aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/objc-arc-container-subscripting.m
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-10-17 02:28:37 +0000
committerJohn McCall <rjmccall@apple.com>2012-10-17 02:28:37 +0000
commit015f33b6741ffceba3a71ee2d71d46418a7dc34c (patch)
treefe2a0c3d3a8b66f0282ef93a379d5eca01f38a4b /test/CodeGenObjC/objc-arc-container-subscripting.m
parent5708c18904304ed4e39abed8131fcad5e2fc0896 (diff)
At -O0, prefer objc_storeStrong with a null new value to the
combination of a load+objc_release; this is generally better for tools that try to track why values are retained and released. Also use objc_storeStrong when copying a block (again, only at -O0), which requires us to do a preliminary store of null in order to compensate for objc_storeStrong's assign semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166085 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC/objc-arc-container-subscripting.m')
-rw-r--r--test/CodeGenObjC/objc-arc-container-subscripting.m5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/CodeGenObjC/objc-arc-container-subscripting.m b/test/CodeGenObjC/objc-arc-container-subscripting.m
index 892491630e..71339c7085 100644
--- a/test/CodeGenObjC/objc-arc-container-subscripting.m
+++ b/test/CodeGenObjC/objc-arc-container-subscripting.m
@@ -13,9 +13,8 @@ id func() {
// CHECK: [[call:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK: [[SIX:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[call]]) nounwind
-// CHECK: [[ARRAY:%.*]] = load %0**
-// CHECK: [[ARRAY_CASTED:%.*]] = bitcast{{.*}}[[ARRAY]] to i8*
-// CHECK: call void @objc_release(i8* [[ARRAY_CASTED]])
+// CHECK: [[ARRAY_CASTED:%.*]] = bitcast %0** {{%.*}} to i8**
+// CHECK: call void @objc_storeStrong(i8** [[ARRAY_CASTED]], i8* null)
// CHECK: [[EIGHT:%.*]] = call i8* @objc_autoreleaseReturnValue(i8* [[SIX]]) nounwind
// CHECK: ret i8* [[EIGHT]]