From e68b8f4dcc2b3a6ab03326ad4167f1164cae61e4 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 17 Oct 2012 02:28:37 +0000 Subject: 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 --- clang/test/CodeGenObjC/objc-arc-container-subscripting.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/test/CodeGenObjC/objc-arc-container-subscripting.m') 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]] -- cgit v1.2.3