diff options
author | John McCall <rjmccall@apple.com> | 2012-01-29 07:46:59 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-01-29 07:46:59 +0000 |
commit | ffa2c1a48e886342cbd76f2ff74881937f952dd6 (patch) | |
tree | e91ee22bb795734e7e7bbdc5ec8a0d824d7084d6 /clang/test/CodeGenObjC/arc.m | |
parent | bbb032e2194191939aff27f0432766b3ac4028ce (diff) | |
download | bcm5719-llvm-ffa2c1a48e886342cbd76f2ff74881937f952dd6.tar.gz bcm5719-llvm-ffa2c1a48e886342cbd76f2ff74881937f952dd6.zip |
When emitting an ARC epilogue that looks like a return of 'self',
kill the retain from the return site.
This has the workaround nature. It's badness all around.
llvm-svn: 149193
Diffstat (limited to 'clang/test/CodeGenObjC/arc.m')
-rw-r--r-- | clang/test/CodeGenObjC/arc.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/arc.m b/clang/test/CodeGenObjC/arc.m index 1a020e2a529..e367c8c19da 100644 --- a/clang/test/CodeGenObjC/arc.m +++ b/clang/test/CodeGenObjC/arc.m @@ -1521,3 +1521,14 @@ void test68(void) { // CHECK-NEXT: [[T2:%.*]] = load i8** [[CL]] // CHECK-NEXT: call void @objc_release(i8* [[T2]]) // CHECK-NEXT: ret void + +// rdar://problem/10564852 +@interface Test69 @end +@implementation Test69 +- (id) foo { return self; } +@end +// CHECK: define internal i8* @"\01-[Test69 foo]"( +// CHECK: [[SELF:%.*]] = alloca [[TEST69:%.*]]*, align 8 +// CHECK: [[T0:%.*]] = load [[TEST69]]** [[SELF]], align 8 +// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST69]]* [[T0]] to i8* +// CHECK-NEXT: ret i8* [[T1]] |