| 1 |
// RUN: %clang_cc1 -triple arm-apple-ios -emit-llvm -debug-info-kind=limited -fblocks -fobjc-runtime=ios-7.0.0 -fobjc-arc %s -o - | FileCheck %s |
| 2 |
@protocol NSObject |
| 3 |
- (id)copy; |
| 4 |
@end |
| 5 |
@class W; |
| 6 |
@interface View1 |
| 7 |
@end |
| 8 |
@implementation Controller { |
| 9 |
void (^Block)(void); |
| 10 |
} |
| 11 |
- (void)View:(View1 *)View foo:(W *)W |
| 12 |
{ |
| 13 |
// The debug type for these two will be identical, because we do not |
| 14 |
// actually emit the ownership qualifier. |
| 15 |
// CHECK: !DILocalVariable(name: "weakSelf", |
| 16 |
// CHECK-SAME: line: [[@LINE+2]] |
| 17 |
// CHECK-SAME: type: ![[SELFTY:[0-9]+]] |
| 18 |
__attribute__((objc_ownership(weak))) __typeof(self) weakSelf = self; |
| 19 |
Block = [^{ |
| 20 |
// CHECK: !DILocalVariable(name: "strongSelf", |
| 21 |
// CHECK-SAME: line: [[@LINE+2]] |
| 22 |
// CHECK-SAME: type: ![[SELFTY]] |
| 23 |
__attribute__((objc_ownership(strong))) __typeof(self) strongSelf = weakSelf; |
| 24 |
} copy]; |
| 25 |
} |
| 26 |
@end |