summaryrefslogtreecommitdiff
path: root/test/Verifier/dbg-line-without-file.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Verifier/dbg-line-without-file.ll')
-rw-r--r--test/Verifier/dbg-line-without-file.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Verifier/dbg-line-without-file.ll b/test/Verifier/dbg-line-without-file.ll
new file mode 100644
index 0000000000000..4d5725959ef14
--- /dev/null
+++ b/test/Verifier/dbg-line-without-file.ll
@@ -0,0 +1,15 @@
+; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
+; CHECK: assembly parsed, but does not verify
+; CHECK: line specified with no file
+
+define void @foo() !dbg !3 {
+ ret void
+}
+
+!llvm.module.flags = !{!0}
+!llvm.dbg.cu = !{!1}
+
+!0 = !{i32 2, !"Debug Info Version", i32 3}
+!1 = distinct !DICompileUnit(language: DW_LANG_C, file: !2)
+!2 = !DIFile(filename: "foo.c", directory: "")
+!3 = distinct !DISubprogram(name: "foo", scope: !1, line: 1, unit: !1)