]> granicus.if.org Git - clang/commitdiff
Document and improve the debug-property-synth.m test based on the
authorAdrian Prantl <aprantl@apple.com>
Wed, 12 Feb 2014 18:24:07 +0000 (18:24 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 12 Feb 2014 18:24:07 +0000 (18:24 +0000)
information provided in the referenced radar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201248 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenObjC/debug-property-synth.m

index f4bc922f1bd90f3a6a75a66c4c188a9c0717ebb1..6685ed2ea9f4c8ce32ef464c8db29c5633e48868 100644 (file)
@@ -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