| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=LINUX |
| 2 | ; RUN: llc -mtriple=x86_64-darwin < %s | FileCheck %s --check-prefix=DARWIN |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 3 | |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 4 | @yyyy = common global i32 0, align 4 |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 5 | |
| 6 | !llvm.dbg.cu = !{!0} |
| Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 7 | !llvm.module.flags = !{!9} |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 8 | |
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame^] | 9 | !0 = !{!"0x11\0012\00clang version 3.1 (trunk 143009)\001\00\000\00\000", !8, !1, !1, !1, !3, !1} ; [ DW_TAG_compile_unit ] |
| 10 | !1 = !{} |
| 11 | !3 = !{!5} |
| 12 | !5 = !{!"0x34\00yyyy\00yyyy\00\001\000\001", null, !6, !7, i32* @yyyy, null} ; [ DW_TAG_variable ] |
| 13 | !6 = !{!"0x29", !8} ; [ DW_TAG_file_type ] |
| 14 | !7 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] |
| 15 | !8 = !{!"z.c", !"/home/nicholas"} |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 16 | |
| Eric Christopher | 9cd26af | 2013-09-20 23:22:52 +0000 | [diff] [blame] | 17 | ; Verify that "yyyy" ended up in the stringpool. |
| 18 | ; LINUX: .section .debug_str,"MS",@progbits,1 |
| 19 | ; LINUX: yyyy |
| 20 | ; DARWIN: .section __DWARF,__debug_str,regular,debug |
| 21 | ; DARWIN: yyyy |
| 22 | |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 23 | ; Verify that we refer to 'yyyy' with a relocation. |
| Eric Christopher | 3bf29fd | 2012-12-27 02:14:01 +0000 | [diff] [blame] | 24 | ; LINUX: .long .Linfo_string3 # DW_AT_name |
| Manman Ren | f6b936b | 2013-10-29 05:49:41 +0000 | [diff] [blame] | 25 | ; LINUX-NEXT: .long {{[0-9]+}} # DW_AT_type |
| Eric Christopher | bb69a27 | 2012-08-24 01:14:27 +0000 | [diff] [blame] | 26 | ; LINUX-NEXT: # DW_AT_external |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 27 | ; LINUX-NEXT: .byte 1 # DW_AT_decl_file |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 28 | ; LINUX-NEXT: .byte 1 # DW_AT_decl_line |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 29 | ; LINUX-NEXT: .byte 9 # DW_AT_location |
| 30 | ; LINUX-NEXT: .byte 3 |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 31 | ; LINUX-NEXT: .quad yyyy |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 32 | |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 33 | ; Verify that we refer to 'yyyy' without a relocation. |
| Manman Ren | f6b936b | 2013-10-29 05:49:41 +0000 | [diff] [blame] | 34 | ; DARWIN: Lset[[ID:[0-9]+]] = Linfo_string3-Linfo_string ## DW_AT_name |
| 35 | ; DARWIN-NEXT: .long Lset[[ID]] |
| 36 | ; DARWIN-NEXT: .long {{[0-9]+}} ## DW_AT_type |
| Eric Christopher | e31e072 | 2013-09-04 22:21:24 +0000 | [diff] [blame] | 37 | ; DARWIN-NEXT: ## DW_AT_external |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 38 | ; DARWIN-NEXT: .byte 1 ## DW_AT_decl_file |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 39 | ; DARWIN-NEXT: .byte 1 ## DW_AT_decl_line |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 40 | ; DARWIN-NEXT: .byte 9 ## DW_AT_location |
| 41 | ; DARWIN-NEXT: .byte 3 |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 42 | ; DARWIN-NEXT: .quad _yyyy |
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame^] | 43 | !9 = !{i32 1, !"Debug Info Version", i32 2} |