David Blaikie | 6a439ad | 2013-12-04 18:40:29 +0000 | [diff] [blame] | 1 | ; REQUIRES: object-emission |
Devang Patel | 1a0df9a | 2010-05-10 22:49:55 +0000 | [diff] [blame] | 2 | |
Timur Iskhodzhanov | f166f6c | 2014-01-30 01:39:17 +0000 | [diff] [blame] | 3 | ; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s |
Jakob Stoklund Olesen | f28cc03 | 2010-10-15 16:06:42 +0000 | [diff] [blame] | 4 | |
David Blaikie | 6a439ad | 2013-12-04 18:40:29 +0000 | [diff] [blame] | 5 | ; Check that two compile units are generated |
Jakob Stoklund Olesen | f28cc03 | 2010-10-15 16:06:42 +0000 | [diff] [blame] | 6 | |
David Blaikie | 6a439ad | 2013-12-04 18:40:29 +0000 | [diff] [blame] | 7 | ; CHECK: Compile Unit: |
| 8 | ; CHECK: Compile Unit: |
Jakob Stoklund Olesen | f28cc03 | 2010-10-15 16:06:42 +0000 | [diff] [blame] | 9 | |
Devang Patel | 1a0df9a | 2010-05-10 22:49:55 +0000 | [diff] [blame] | 10 | define i32 @foo() nounwind readnone ssp { |
| 11 | return: |
| 12 | ret i32 42, !dbg !0 |
| 13 | } |
| 14 | |
| 15 | define i32 @bar() nounwind readnone ssp { |
| 16 | return: |
| 17 | ret i32 21, !dbg !8 |
| 18 | } |
| 19 | |
David Blaikie | e5a2f70 | 2013-03-08 00:23:31 +0000 | [diff] [blame] | 20 | !llvm.dbg.cu = !{!4, !12} |
Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 21 | !llvm.module.flags = !{!21} |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 22 | !16 = !{!2} |
| 23 | !17 = !{!10} |
David Blaikie | e5a2f70 | 2013-03-08 00:23:31 +0000 | [diff] [blame] | 24 | |
Duncan P. N. Exon Smith | 9885469 | 2015-01-14 22:27:36 +0000 | [diff] [blame^] | 25 | !0 = !MDLocation(line: 3, scope: !1) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 26 | !1 = !{!"0xb\002\000\000", !18, !2} ; [ DW_TAG_lexical_block ] |
| 27 | !2 = !{!"0x2e\00foo\00foo\00foo\002\000\001\000\006\000\000\000", !18, !3, !5, null, i32 ()* @foo, null, null, null} ; [ DW_TAG_subprogram ] |
| 28 | !3 = !{!"0x29", !18} ; [ DW_TAG_file_type ] |
| 29 | !4 = !{!"0x11\001\004.2.1 (Based on Apple Inc. build 5658) (LLVM build)\000\00\000\00\000", !18, !19, !19, !16, null, null} ; [ DW_TAG_compile_unit ] |
| 30 | !5 = !{!"0x15\00\000\000\000\000\000\000", !18, !3, null, !6, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] |
| 31 | !6 = !{!7} |
| 32 | !7 = !{!"0x24\00int\000\0032\0032\000\000\005", !18, !3} ; [ DW_TAG_base_type ] |
Duncan P. N. Exon Smith | 9885469 | 2015-01-14 22:27:36 +0000 | [diff] [blame^] | 33 | !8 = !MDLocation(line: 3, scope: !9) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 34 | !9 = !{!"0xb\002\000\000", !20, !10} ; [ DW_TAG_lexical_block ] |
| 35 | !10 = !{!"0x2e\00bar\00bar\00bar\002\000\001\000\006\000\000\000", !20, !11, !13, null, i32 ()* @bar, null, null, null} ; [ DW_TAG_subprogram ] |
| 36 | !11 = !{!"0x29", !20} ; [ DW_TAG_file_type ] |
| 37 | !12 = !{!"0x11\001\004.2.1 (Based on Apple Inc. build 5658) (LLVM build)\000\00\000\00\000", !20, !19, !19, !17, null, null} ; [ DW_TAG_compile_unit ] |
| 38 | !13 = !{!"0x15\00\000\000\000\000\000\000", !20, !11, null, !14, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] |
| 39 | !14 = !{!15} |
| 40 | !15 = !{!"0x24\00int\000\0032\0032\000\000\005", !20, !11} ; [ DW_TAG_base_type ] |
| 41 | !18 = !{!"a.c", !"/tmp/"} |
| 42 | !19 = !{i32 0} |
| 43 | !20 = !{!"b.c", !"/tmp/"} |
| 44 | !21 = !{i32 1, !"Debug Info Version", i32 2} |