2cf8d563ad90fe0a6e7df652ef3d40cf6b8f0caa
[oota-llvm.git] / test / Bitcode / drop-debug-info.ll
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
3 ; RUN: verify-uselistorder < %t.bc
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
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}
25 !12 = !{i32 4, i32 0, !4, null}
26
27 ; WARN: warning: ignoring debug info with an invalid version (0)
28 ; CHECK-NOT: !dbg
29 ; CHECK-NOT: !llvm.dbg.cu