From: Adrian Prantl Date: Wed, 12 Feb 2014 18:24:07 +0000 (+0000) Subject: Document and improve the debug-property-synth.m test based on the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4022bf2ed043db77289bdaf7285c98076e3aa12;p=clang Document and improve the debug-property-synth.m test based on the information provided in the referenced radar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201248 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenObjC/debug-property-synth.m b/test/CodeGenObjC/debug-property-synth.m index f4bc922f1b..6685ed2ea9 100644 --- a/test/CodeGenObjC/debug-property-synth.m +++ b/test/CodeGenObjC/debug-property-synth.m @@ -1,8 +1,27 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s -// Radar 9468526 +// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s +// rdar://problem/9468526 +// +// Setting a breakpoint on a property should create breakpoints in +// synthesized getters/setters. +// @interface I { int _p1; } +// Test that the linetable entries for the synthesized getter and +// setter are correct. +// +// CHECK: define internal i32 {{.*}}[I p1] +// CHECK-NOT: ret i32 +// CHECK: load {{.*}}, !dbg ![[DBG1:[0-9]+]] +// +// CHECK: define internal void {{.*}}[I setP1:] +// CHECK-NOT: ret i32 +// CHECK: load {{.*}}, !dbg ![[DBG2:[0-9]+]] +// +// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+4]]] [local] [def] [-[I p1]] +// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+3]]] [local] [def] [-[I setP1:]] +// CHECK: ![[DBG1]] = metadata !{i32 [[@LINE+2]], +// CHECK: ![[DBG2]] = metadata !{i32 [[@LINE+1]], @property int p1; @end @@ -13,8 +32,5 @@ int main() { I *myi; myi.p1 = 2; - return 0; + return myi.p1; } - -// FIXME: Make this test ir files. -// CHECK: .loc 2 6 0