blob: 5109b5e4327966b6093a7e7ddac13bbf52037372 [file] [log] [blame]
Manman Ren2ebfb422014-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 Smithc8eccd12014-08-19 21:08:27 +00003; RUN: verify-uselistorder < %t.bc
Manman Ren8b4306c2013-12-02 21:29:56 +00004
5define i32 @main() {
6entry:
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
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000015!0 = !{!"0x11\0012\00clang version 3.5 (trunk 195495) (llvm/trunk 195495:195504M)\000\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [/Users/manmanren/llvm_gmail/release/../llvm/tools/clang/test/CodeGen/debug-info-version.c] [DW_LANG_C99]
16!1 = !{!"../llvm/tools/clang/test/CodeGen/debug-info-version.c", !"/Users/manmanren/llvm_gmail/release"}
17!2 = !{i32 0}
18!3 = !{!4}
19!4 = !{!"0x2e\00main\00main\00\003\000\001\000\006\00256\000\003", !1, !5, !6, null, i32 ()* @main, null, null, !2} ; [ DW_TAG_subprogram ] [line 3] [def] [main]
20!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [/Users/manmanren/llvm_gmail/release/../llvm/tools/clang/test/CodeGen/debug-info-version.c]
21!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
22!7 = !{!8}
23!8 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
24!9 = !{i32 2, !"Dwarf Version", i32 2}
Duncan P. N. Exon Smith98854692015-01-14 22:27:36 +000025!12 = !MDLocation(line: 4, scope: !4)
Manman Ren8b4306c2013-12-02 21:29:56 +000026
Manman Ren81f136f2014-02-04 23:53:12 +000027; WARN: warning: ignoring debug info with an invalid version (0)
Manman Ren8b4306c2013-12-02 21:29:56 +000028; CHECK-NOT: !dbg
29; CHECK-NOT: !llvm.dbg.cu