r201248 - Document and improve the debug-property-synth.m test based on the

Adrian Prantl aprantl at apple.com
Wed Feb 12 10:24:07 PST 2014


Author: adrian
Date: Wed Feb 12 12:24:07 2014
New Revision: 201248

URL: http://llvm.org/viewvc/llvm-project?rev=201248&view=rev
Log:
Document and improve the debug-property-synth.m test based on the
information provided in the referenced radar.

Modified:
    cfe/trunk/test/CodeGenObjC/debug-property-synth.m

Modified: cfe/trunk/test/CodeGenObjC/debug-property-synth.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-property-synth.m?rev=201248&r1=201247&r2=201248&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-property-synth.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-property-synth.m Wed Feb 12 12:24:07 2014
@@ -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





More information about the cfe-commits mailing list