summaryrefslogtreecommitdiffstats
path: root/clang/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
commite68b8f4dcc2b3a6ab03326ad4167f1164cae61e4 (patch)
tree52ff6180b7eaa5d763de780d9a521ae5b60d631c /clang/test/CodeGenObjC/objc-arc-container-subscripting.m
parent6f7206132fa567268b561608268639db5edafdcb (diff)
downloadbcm5719-llvm-e68b8f4dcc2b3a6ab03326ad4167f1164cae61e4.tar.gz
bcm5719-llvm-e68b8f4dcc2b3a6ab03326ad4167f1164cae61e4.zip
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. llvm-svn: 166085
Diffstat (limited to 'clang/test/CodeGenObjC/objc-arc-container-subscripting.m')
-rw-r--r--clang/test/CodeGenObjC/objc-arc-container-subscripting.m5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/test/CodeGenObjC/objc-arc-container-subscripting.m b/clang/test/CodeGenObjC/objc-arc-container-subscripting.m
index 892491630e6..71339c7085a 100644
--- a/clang/test/CodeGenObjC/objc-arc-container-subscripting.m
+++ b/clang/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]]
OpenPOWER on IntegriCloud