Manman Ren | 2ebfb42 | 2014-01-16 01:51:12 +0000 | [diff] [blame] | 1 | ; 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 Smith | c8eccd1 | 2014-08-19 21:08:27 +0000 | [diff] [blame] | 3 | ; RUN: verify-uselistorder < %t.bc |
Manman Ren | 8b4306c | 2013-12-02 21:29:56 +0000 | [diff] [blame] | 4 | |
| 5 | define i32 @main() { |
| 6 | entry: |
| 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 Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 15 | !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 Smith | 9885469 | 2015-01-14 22:27:36 +0000 | [diff] [blame] | 25 | !12 = !MDLocation(line: 4, scope: !4) |
Manman Ren | 8b4306c | 2013-12-02 21:29:56 +0000 | [diff] [blame] | 26 | |
Manman Ren | 81f136f | 2014-02-04 23:53:12 +0000 | [diff] [blame] | 27 | ; WARN: warning: ignoring debug info with an invalid version (0) |
Manman Ren | 8b4306c | 2013-12-02 21:29:56 +0000 | [diff] [blame] | 28 | ; CHECK-NOT: !dbg |
| 29 | ; CHECK-NOT: !llvm.dbg.cu |