aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-09-22 21:13:48 +0000
committerDevang Patel <dpatel@apple.com>2010-09-22 21:13:48 +0000
commitb4a9aec74ad8e6af86b6de609b3068a4f7dc921b (patch)
tree125f3b9ceae8b7f14bcb1d1b5bfd8f2f21c491ac
parent0e1cd944398c9e9a3d4c0cf5273a126be91830e8 (diff)
Testcase for r114585.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114586 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/debug-info-var-location.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/debug-info-var-location.c b/test/CodeGen/debug-info-var-location.c
new file mode 100644
index 0000000000..12edb08982
--- /dev/null
+++ b/test/CodeGen/debug-info-var-location.c
@@ -0,0 +1,21 @@
+// RUN: %clang -S -g -fverbose-asm %s -o - | FileCheck %s
+// Radar 8461032
+// CHECK: DW_AT_location
+// CHECK-NEXT: byte 145
+
+// 145 is DW_OP_fbreg
+struct s {
+ int a;
+ struct s *next;
+};
+
+int foo(struct s *s) {
+ switch (s->a) {
+ case 1:
+ case 2: {
+ struct s *sp = s->next;
+ }
+ break;
+ }
+ return 1;
+}