Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s |
| 2 | // rdar://problem/9468526 |
| 3 | // |
| 4 | // Setting a breakpoint on a property should create breakpoints in |
| 5 | // synthesized getters/setters. |
| 6 | // |
Devang Patel | 8d3f897 | 2011-05-19 23:37:41 +0000 | [diff] [blame] | 7 | @interface I { |
| 8 | int _p1; |
| 9 | } |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 10 | // Test that the linetable entries for the synthesized getter and |
| 11 | // setter are correct. |
| 12 | // |
| 13 | // CHECK: define {{.*}}[I p1] |
| 14 | // CHECK-NOT: ret |
| 15 | // CHECK: load {{.*}}, !dbg ![[DBG1:[0-9]+]] |
| 16 | // |
| 17 | // CHECK: define {{.*}}[I setP1:] |
| 18 | // CHECK-NOT: ret |
| 19 | // CHECK: load {{.*}}, !dbg ![[DBG2:[0-9]+]] |
| 20 | // |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame^] | 21 | // CHECK: !MDSubprogram(name: "-[I p1]",{{.*}} line: [[@LINE+4]],{{.*}} isLocal: true, isDefinition: true |
| 22 | // CHECK: !MDSubprogram(name: "-[I setP1:]",{{.*}} line: [[@LINE+3]],{{.*}} isLocal: true, isDefinition: true |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 23 | // CHECK: ![[DBG1]] = !MDLocation(line: [[@LINE+2]], |
| 24 | // CHECK: ![[DBG2]] = !MDLocation(line: [[@LINE+1]], |
Devang Patel | 8d3f897 | 2011-05-19 23:37:41 +0000 | [diff] [blame] | 25 | @property int p1; |
| 26 | @end |
| 27 | |
| 28 | @implementation I |
| 29 | @synthesize p1 = _p1; |
| 30 | @end |
| 31 | |
| 32 | int main() { |
| 33 | I *myi; |
| 34 | myi.p1 = 2; |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 35 | return myi.p1; |
Devang Patel | 8d3f897 | 2011-05-19 23:37:41 +0000 | [diff] [blame] | 36 | } |