brintos

brintos / llvm-project-archived public Read only

0
0
Text · 993 B · e320516 Raw
36 lines · plain
1// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s2//3// Setting a breakpoint on a property should create breakpoints in4// synthesized getters/setters.5//6@interface I {7  int _p1;8}9@property int p1;10@end11 12@implementation I13// Test that the linetable entries for the synthesized getter and14// setter are correct.15//16// CHECK: define {{.*}}[I p1]17// CHECK-NOT: ret18// CHECK: load {{.*}}, !dbg ![[DBG1:[0-9]+]]19//20// CHECK: define {{.*}}[I setP1:]21// CHECK-NOT: ret22// CHECK: load {{.*}}, !dbg ![[DBG2:[0-9]+]]23//24// CHECK: !DISubprogram(name: "-[I p1]",{{.*}} line: [[@LINE+4]],{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition25// CHECK: ![[DBG1]] = !DILocation(line: [[@LINE+3]],26// CHECK: !DISubprogram(name: "-[I setP1:]",{{.*}} line: [[@LINE+2]],{{.*}} DISPFlagLocalToUnit | DISPFlagDefinition27// CHECK: ![[DBG2]] = !DILocation(line: [[@LINE+1]],28@synthesize p1 = _p1;29@end30 31int main(void) {32  I *myi;33  myi.p1 = 2;34  return myi.p1;35}36