2015-10-08 12:24:12 +08:00
|
|
|
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
|
2014-02-13 02:24:07 +08:00
|
|
|
// rdar://problem/9468526
|
|
|
|
//
|
|
|
|
// Setting a breakpoint on a property should create breakpoints in
|
|
|
|
// synthesized getters/setters.
|
|
|
|
//
|
2014-02-13 02:24:04 +08:00
|
|
|
@interface I {
|
|
|
|
int _p1;
|
|
|
|
}
|
2019-11-05 06:28:14 +08:00
|
|
|
@property int p1;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I
|
2014-02-13 02:24:07 +08:00
|
|
|
// Test that the linetable entries for the synthesized getter and
|
|
|
|
// setter are correct.
|
|
|
|
//
|
2014-02-13 03:26:19 +08:00
|
|
|
// CHECK: define {{.*}}[I p1]
|
|
|
|
// CHECK-NOT: ret
|
2014-02-13 02:24:07 +08:00
|
|
|
// CHECK: load {{.*}}, !dbg ![[DBG1:[0-9]+]]
|
|
|
|
//
|
2014-02-13 03:26:19 +08:00
|
|
|
// CHECK: define {{.*}}[I setP1:]
|
|
|
|
// CHECK-NOT: ret
|
2014-02-13 02:24:07 +08:00
|
|
|
// CHECK: load {{.*}}, !dbg ![[DBG2:[0-9]+]]
|
|
|
|
//
|
2018-11-29 05:18:07 +08:00
|
|
|
// CHECK: !DISubprogram(name: "-[I p1]",{{.*}} line: [[@LINE+4]],{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
2016-04-15 23:55:45 +08:00
|
|
|
// CHECK: ![[DBG1]] = !DILocation(line: [[@LINE+3]],
|
2018-11-29 05:18:07 +08:00
|
|
|
// CHECK: !DISubprogram(name: "-[I setP1:]",{{.*}} line: [[@LINE+2]],{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: ![[DBG2]] = !DILocation(line: [[@LINE+1]],
|
2014-02-13 02:24:04 +08:00
|
|
|
@synthesize p1 = _p1;
|
|
|
|
@end
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
I *myi;
|
|
|
|
myi.p1 = 2;
|
2014-02-13 02:24:07 +08:00
|
|
|
return myi.p1;
|
2014-02-13 02:24:04 +08:00
|
|
|
}
|