Douglas Katzman | 3459ce2 | 2015-10-08 04:24:12 +0000 | [diff] [blame] | 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 |
Adrian Prantl | 179af90 | 2013-09-26 21:35:50 +0000 | [diff] [blame] | 2 | // rdar://problem/14990656 |
| 3 | @protocol NSObject |
| 4 | - (id)copy; |
| 5 | @end |
| 6 | @class W; |
| 7 | @interface View1 |
| 8 | @end |
| 9 | @implementation Controller { |
| 10 | void (^Block)(void); |
| 11 | } |
| 12 | - (void)View:(View1 *)View foo:(W *)W |
| 13 | { |
| 14 | // The debug type for these two will be identical, because we do not |
| 15 | // actually emit the ownership qualifier. |
Duncan P. N. Exon Smith | 38a7f11 | 2015-07-31 18:59:37 +0000 | [diff] [blame] | 16 | // CHECK: !DILocalVariable(name: "weakSelf", |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 17 | // CHECK-SAME: line: [[@LINE+2]] |
| 18 | // CHECK-SAME: type: ![[SELFTY:[0-9]+]] |
Adrian Prantl | 179af90 | 2013-09-26 21:35:50 +0000 | [diff] [blame] | 19 | __attribute__((objc_ownership(weak))) __typeof(self) weakSelf = self; |
| 20 | Block = [^{ |
Duncan P. N. Exon Smith | 38a7f11 | 2015-07-31 18:59:37 +0000 | [diff] [blame] | 21 | // CHECK: !DILocalVariable(name: "strongSelf", |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 22 | // CHECK-SAME: line: [[@LINE+2]] |
| 23 | // CHECK-SAME: type: ![[SELFTY]] |
Adrian Prantl | 179af90 | 2013-09-26 21:35:50 +0000 | [diff] [blame] | 24 | __attribute__((objc_ownership(strong))) __typeof(self) strongSelf = weakSelf; |
| 25 | } copy]; |
| 26 | } |
| 27 | @end |