aboutsummaryrefslogtreecommitdiffstats
path: root/test/Verifier/dbg.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Verifier/dbg.ll')
-rw-r--r--test/Verifier/dbg.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Verifier/dbg.ll b/test/Verifier/dbg.ll
new file mode 100644
index 0000000..3cff1e0
--- /dev/null
+++ b/test/Verifier/dbg.ll
@@ -0,0 +1,18 @@
+; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
+
+define void @foo() {
+entry:
+ br label %exit, !dbg !MDLocation(scope: !MDSubprogram(), inlinedAt: !{})
+; CHECK: inlined-at should be a location
+; CHECK-NEXT: !{{[0-9]+}} = !MDLocation(line: 0, scope: !{{[0-9]+}}, inlinedAt: ![[IA:[0-9]+]])
+; CHECK-NEXT: ![[IA]] = !{}
+
+exit:
+ ret void, !dbg !{}
+; CHECK: invalid !dbg metadata attachment
+; CHECK-NEXT: ret void, !dbg ![[LOC:[0-9]+]]
+; CHECK-NEXT: ![[LOC]] = !{}
+}
+
+!llvm.module.flags = !{!0}
+!0 = !{i32 2, !"Debug Info Version", i32 3}