]> granicus.if.org Git - clang/commitdiff
Add test case to check line number in debug info.
authorDevang Patel <dpatel@apple.com>
Mon, 20 Apr 2009 19:07:55 +0000 (19:07 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 20 Apr 2009 19:07:55 +0000 (19:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69617 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/lineno-dbginfo.c [new file with mode: 0644]

diff --git a/test/CodeGen/lineno-dbginfo.c b/test/CodeGen/lineno-dbginfo.c
new file mode 100644 (file)
index 0000000..fe9e59a
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: echo "#include <stdio.h>" > %t.h
+// RUN: clang -S -save-temps -g -include %t.h %s -emit-llvm -o %t.ll
+// RUN: grep "i32 5" %t.ll
+// outer is at line number 5.
+int outer = 42;