blob: 9260c3fafe8b8437d74f16d8e7e937640c1fe065 [file] [log] [blame]
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -fobjc-runtime-has-arc -o - %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -emit-llvm -fobjc-runtime-has-arc -o - %s | FileCheck %s
// rdar://8881826
// rdar://9412038
@interface I
{
id ivar;
}
- (id) Meth;
+ (id) MyAlloc;;
@end
@implementation I
- (id) Meth {
@autoreleasepool {
id p = [I MyAlloc];
if (!p)
return ivar;
}
return 0;
}
+ (id) MyAlloc {
return 0;
}
@end
// CHECK: call i8* @objc_autoreleasePoolPush
// CHECK: [[T:%.*]] = load i8** [[A:%.*]]
// CHECK: call void @objc_autoreleasePoolPop