blob: 2a6fd8bbb48e451f8eb644e923bec23c09a5496f [file] [log] [blame]
Duncan P. N. Exon Smithb56b5af2015-08-28 21:55:35 +00001; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s
2
Peter Collingbourned4bff302015-11-05 22:03:56 +00003define void @foo() !dbg !4 !dbg !4 {
Duncan P. N. Exon Smithb56b5af2015-08-28 21:55:35 +00004 unreachable
5}
6
7; CHECK-NOT: !dbg
8; CHECK: function !dbg attachment must be a subprogram
9; CHECK-NEXT: void ()* @bar
10; CHECK-NEXT: !{{[0-9]+}} = !{}
11define void @bar() !dbg !6 {
12 unreachable
13}
14
15!llvm.module.flags = !{!0}
16!0 = !{i32 2, !"Debug Info Version", i32 3}
17
18!llvm.dbg.cu = !{!1}
19!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, subprograms: !3)
20!2 = !DIFile(filename: "t.c", directory: "/path/to/dir")
21!3 = !{!4}
Peter Collingbourned4bff302015-11-05 22:03:56 +000022!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !2)
Duncan P. N. Exon Smithb56b5af2015-08-28 21:55:35 +000023!6 = !{}