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// 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//
21// CHECK: !DISubprogram(name: "-[I p1]",{{.*}} line: [[@LINE+4]],{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
22// CHECK: ![[DBG1]] = !DILocation(line: [[@LINE+3]],
23// CHECK: !DISubprogram(name: "-[I setP1:]",{{.*}} line: [[@LINE+2]],{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
24// CHECK: ![[DBG2]] = !DILocation(line: [[@LINE+1]],
25@property int p1;
26@end
27
28@implementation I
29@synthesize p1 = _p1;
30@end
31
32int main() {
33  I *myi;
34  myi.p1 = 2;
35  return myi.p1;
36}
37