blob: 0bec8f0679efa929869ff9d0ed5afe4dbbe93fec [file] [log] [blame]
Manman Ren2666b152014-01-16 01:51:12 +00001; RUN: llvm-as < %s -o %t.bc 2>&1 >/dev/null | FileCheck -check-prefix=WARN %s
2; RUN: llvm-dis < %t.bc | FileCheck %s
Duncan P. N. Exon Smith13f5c582014-08-19 21:08:27 +00003; RUN: verify-uselistorder < %t.bc
Manman Ren7d318bd2013-12-02 21:29:56 +00004
Peter Collingbourne5f220be2015-11-05 22:03:56 +00005define i32 @main() !dbg !4 {
Manman Ren7d318bd2013-12-02 21:29:56 +00006entry:
7 %retval = alloca i32, align 4
8 store i32 0, i32* %retval
9 ret i32 0, !dbg !12
10}
11
12!llvm.dbg.cu = !{!0}
13!llvm.module.flags = !{!9}
14
Adrian Prantl4eeaa0d2016-04-15 15:57:41 +000015!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (trunk 195495) (llvm/trunk 195495:195504M)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
Duncan P. N. Exon Smithe56023a2015-04-29 16:38:44 +000016!1 = !DIFile(filename: "../llvm/tools/clang/test/CodeGen/debug-info-version.c", directory: "/Users/manmanren/llvm_gmail/release")
Duncan P. N. Exon Smith1ef70ff2014-12-15 19:07:53 +000017!2 = !{i32 0}
Shiva Chena8a13bc2018-05-09 02:40:45 +000018!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, retainedNodes: !2)
Duncan P. N. Exon Smithe56023a2015-04-29 16:38:44 +000019!5 = !DIFile(filename: "../llvm/tools/clang/test/CodeGen/debug-info-version.c", directory: "/Users/manmanren/llvm_gmail/release")
20!6 = !DISubroutineType(types: !7)
Duncan P. N. Exon Smith1ef70ff2014-12-15 19:07:53 +000021!7 = !{!8}
Duncan P. N. Exon Smithe56023a2015-04-29 16:38:44 +000022!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Duncan P. N. Exon Smith1ef70ff2014-12-15 19:07:53 +000023!9 = !{i32 2, !"Dwarf Version", i32 2}
Duncan P. N. Exon Smithe56023a2015-04-29 16:38:44 +000024!12 = !DILocation(line: 4, scope: !4)
Manman Ren7d318bd2013-12-02 21:29:56 +000025
Manman Ren524f08d2014-02-04 23:53:12 +000026; WARN: warning: ignoring debug info with an invalid version (0)
Manman Ren7d318bd2013-12-02 21:29:56 +000027; CHECK-NOT: !dbg
28; CHECK-NOT: !llvm.dbg.cu