1; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s 2; RUN: verify-uselistorder %s 3 4; Ensure we accept debug info where DIFiles within a DICompileUnit either all 5; have source, or none have source. 6 7define dso_local void @foo() !dbg !6 { 8 ret void 9} 10 11define dso_local void @bar() !dbg !7 { 12 ret void 13} 14 15define dso_local void @baz() !dbg !9 { 16 ret void 17} 18 19define dso_local void @qux() !dbg !11 { 20 ret void 21} 22 23!llvm.dbg.cu = !{!0, !2} 24!llvm.module.flags = !{!4, !5} 25 26!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1) 27; CHECK: !1 = !DIFile(filename: "foo.c", directory: "dir", source: "void foo() { }\0A") 28!1 = !DIFile(filename: "foo.c", directory: "dir", source: "void foo() { }\0A") 29!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3) 30; CHECK: !3 = !DIFile(filename: "qux.h", directory: "dir") 31!3 = !DIFile(filename: "qux.h", directory: "dir") 32!4 = !{i32 2, !"Dwarf Version", i32 5} 33!5 = !{i32 2, !"Debug Info Version", i32 3} 34!6 = distinct !DISubprogram(name: "foo", file: !1, unit: !0) 35!7 = distinct !DISubprogram(name: "bar", file: !8, unit: !0) 36; CHECK: !8 = !DIFile(filename: "bar.h", directory: "dir", source: "void bar() { }\0A") 37!8 = !DIFile(filename: "bar.h", directory: "dir", source: "void bar() { }\0A") 38!9 = distinct !DISubprogram(name: "baz", file: !10, unit: !2) 39; CHECK: !10 = !DIFile(filename: "baz.c", directory: "dir") 40!10 = !DIFile(filename: "baz.c", directory: "dir") 41!11 = distinct !DISubprogram(name: "qux", file: !3, unit: !2) 42