aboutsummaryrefslogtreecommitdiff
path: root/test/FrontendC
diff options
context:
space:
mode:
authorStuart Hastings <stuart@apple.com>2010-07-08 20:31:05 +0000
committerStuart Hastings <stuart@apple.com>2010-07-08 20:31:05 +0000
commit39ccb98b27cdb3a3e49af6866c781aa419ed55be (patch)
tree1192299bcb975e93574327700289a5ace8f4780d /test/FrontendC
parent1b02acb2a0513b3ec20585196d485ebc3da0ccec (diff)
Test case for r107843. Radar 8152866.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendC')
-rw-r--r--test/FrontendC/2010-07-08-DeclDebugLineNo.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/FrontendC/2010-07-08-DeclDebugLineNo.c b/test/FrontendC/2010-07-08-DeclDebugLineNo.c
new file mode 100644
index 0000000000..491b7dbe74
--- /dev/null
+++ b/test/FrontendC/2010-07-08-DeclDebugLineNo.c
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S -O0 -g %s -o - | FileCheck %s
+// Insure that dbg.declare lines for locals refer to correct line number records.
+// Radar 8152866.
+void foo() {
+ int l = 0; // line #4: CHECK: {{call.*llvm.dbg.declare.*%l.*\!dbg }}[[variable_l:![0-9]+]]
+ int p = 0; // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]]
+}
+// Now match the line number records:
+// CHECK: {{^}}[[variable_l]]{{ = metadata ![{]i32 5,}}
+// CHECK: {{^}}[[variable_p]]{{ = metadata ![{]i32 6,}}