blob: 830929afb2e83ae282d17d2d95da0452493f2b48 [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -fobjc-runtime=macosx-10.7 -o - %s | FileCheck %s
2// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -emit-llvm -fobjc-runtime=macosx-10.7 -o - %s | FileCheck %s
John McCallf85e1932011-06-15 23:02:42 +00003// rdar://8881826
4// rdar://9412038
5
6@interface I
7{
8 id ivar;
9}
10- (id) Meth;
11+ (id) MyAlloc;;
12@end
13
14@implementation I
15- (id) Meth {
16 @autoreleasepool {
17 id p = [I MyAlloc];
18 if (!p)
19 return ivar;
20 }
21 return 0;
22}
23+ (id) MyAlloc {
24 return 0;
25}
26@end
27
28// CHECK: call i8* @objc_autoreleasePoolPush
29// CHECK: [[T:%.*]] = load i8** [[A:%.*]]
30// CHECK: call void @objc_autoreleasePoolPop