1// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %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//
7@interface I {
8  int _p1;
9}
10@property int p1;
11@end
12
13@implementation I
14// Test that the linetable entries for the synthesized getter and
15// setter are correct.
16//
17// CHECK: define {{.*}}[I p1]
18// CHECK-NOT: ret
19// CHECK: load {{.*}}, !dbg ![[DBG1:[0-9]+]]
20//
21// CHECK: define {{.*}}[I setP1:]
22// CHECK-NOT: ret
23// CHECK: load {{.*}}, !dbg ![[DBG2:[0-9]+]]
24//
25// CHECK: !DISubprogram(name: "-[I p1]",{{.*}} line: [[@LINE+4]],{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
26// CHECK: ![[DBG1]] = !DILocation(line: [[@LINE+3]],
27// CHECK: !DISubprogram(name: "-[I setP1:]",{{.*}} line: [[@LINE+2]],{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
28// CHECK: ![[DBG2]] = !DILocation(line: [[@LINE+1]],
29@synthesize p1 = _p1;
30@end
31
32int main() {
33  I *myi;
34  myi.p1 = 2;
35  return myi.p1;
36}
37