Douglas Katzman | 3459ce2 | 2015-10-08 04:24:12 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s |
Adrian Prantl | a03a85a | 2013-03-06 22:03:30 +0000 | [diff] [blame] | 2 | |
| 3 | // Debug symbols for private ivars. This test ensures that we are |
| 4 | // generating debug info for ivars added by the implementation. |
| 5 | __attribute((objc_root_class)) @interface NSObject { |
| 6 | id isa; |
| 7 | } |
| 8 | @end |
| 9 | |
| 10 | @protocol Protocol |
| 11 | @end |
| 12 | |
| 13 | @interface Delegate : NSObject<Protocol> { |
| 14 | @protected int foo; |
| 15 | } |
| 16 | @end |
| 17 | |
| 18 | @interface Delegate(NSObject) |
| 19 | - (void)f; |
| 20 | @end |
| 21 | |
| 22 | @implementation Delegate(NSObject) |
| 23 | - (void)f { return; } |
| 24 | @end |
| 25 | |
| 26 | @implementation Delegate { |
| 27 | int bar; |
| 28 | } |
| 29 | |
| 30 | - (void)g:(NSObject*) anObject { |
| 31 | bar = foo; |
| 32 | } |
| 33 | @end |
| 34 | |
Duncan P. N. Exon Smith | 9dd4e4e | 2015-04-29 16:40:08 +0000 | [diff] [blame] | 35 | // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "foo" |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 36 | // CHECK-SAME: line: 14 |
| 37 | // CHECK-SAME: baseType: ![[INT:[0-9]+]] |
| 38 | // CHECK-SAME: size: 32, align: 32, |
| 39 | // CHECK-NOT: offset: |
| 40 | // CHECK-SAME: flags: DIFlagProtected |
Duncan P. N. Exon Smith | 9dd4e4e | 2015-04-29 16:40:08 +0000 | [diff] [blame] | 41 | // CHECK: ![[INT]] = !DIBasicType(name: "int" |
| 42 | // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "bar" |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 43 | // CHECK-SAME: line: 27 |
| 44 | // CHECK-SAME: baseType: ![[INT:[0-9]+]] |
| 45 | // CHECK-SAME: size: 32, align: 32, |
| 46 | // CHECK-NOT: offset: |
| 47 | // CHECK-SAME: flags: DIFlagPrivate |