| 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 | |
| NAKAMURA Takumi | 2867a0d | 2013-09-20 12:57:34 +0000 | [diff] [blame] | 4 | ; FIXME: Investigating. |
| 5 | ; XFAIL: win32 |
| 6 | |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 7 | @yyyy = common global i32 0, align 4 |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 8 | |
| 9 | !llvm.dbg.cu = !{!0} |
| 10 | |
| David Blaikie | f55abea | 2013-04-22 06:12:31 +0000 | [diff] [blame] | 11 | !0 = metadata !{i32 786449, metadata !8, i32 12, metadata !"clang version 3.1 (trunk 143009)", i1 true, metadata !"", i32 0, metadata !1, metadata !1, metadata !1, metadata !3, metadata !3, metadata !""} ; [ DW_TAG_compile_unit ] |
| David Blaikie | 33111df | 2013-02-02 05:56:24 +0000 | [diff] [blame] | 12 | !1 = metadata !{i32 0} |
| 13 | !3 = metadata !{metadata !5} |
| David Blaikie | 47922fb | 2013-03-11 22:37:40 +0000 | [diff] [blame] | 14 | !5 = metadata !{i32 720948, i32 0, null, metadata !"yyyy", metadata !"yyyy", metadata !"", metadata !6, i32 1, metadata !7, i32 0, i32 1, i32* @yyyy, null} ; [ DW_TAG_variable ] |
| David Blaikie | 5692e72 | 2013-03-28 02:44:59 +0000 | [diff] [blame] | 15 | !6 = metadata !{i32 720937, metadata !8} ; [ DW_TAG_file_type ] |
| 16 | !7 = metadata !{i32 720932, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] |
| David Blaikie | 8fb8224 | 2013-03-17 21:13:55 +0000 | [diff] [blame] | 17 | !8 = metadata !{metadata !"z.c", metadata !"/home/nicholas"} |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 18 | |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 19 | ; Verify that we refer to 'yyyy' with a relocation. |
| Eric Christopher | 3bf29fd | 2012-12-27 02:14:01 +0000 | [diff] [blame] | 20 | ; LINUX: .long .Linfo_string3 # DW_AT_name |
| Eric Christopher | bb69a27 | 2012-08-24 01:14:27 +0000 | [diff] [blame] | 21 | ; LINUX-NEXT: .long 38 # DW_AT_type |
| 22 | ; LINUX-NEXT: # DW_AT_external |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 23 | ; LINUX-NEXT: .byte 1 # DW_AT_decl_file |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 24 | ; LINUX-NEXT: .byte 1 # DW_AT_decl_line |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 25 | ; LINUX-NEXT: .byte 9 # DW_AT_location |
| 26 | ; LINUX-NEXT: .byte 3 |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 27 | ; LINUX-NEXT: .quad yyyy |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 28 | |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 29 | ; Verify that we refer to 'yyyy' without a relocation. |
| Manman Ren | d2c38d6 | 2013-02-06 00:59:41 +0000 | [diff] [blame] | 30 | ; DARWIN: Lset5 = Linfo_string3-Linfo_string ## DW_AT_name |
| 31 | ; DARWIN-NEXT: .long Lset5 |
| Eric Christopher | e31e072 | 2013-09-04 22:21:24 +0000 | [diff] [blame] | 32 | ; DARWIN-NEXT: .long 38 ## DW_AT_type |
| 33 | ; DARWIN-NEXT: ## DW_AT_external |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 34 | ; DARWIN-NEXT: .byte 1 ## DW_AT_decl_file |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 35 | ; DARWIN-NEXT: .byte 1 ## DW_AT_decl_line |
| Nick Lewycky | d59c0ca | 2011-10-27 06:44:11 +0000 | [diff] [blame] | 36 | ; DARWIN-NEXT: .byte 9 ## DW_AT_location |
| 37 | ; DARWIN-NEXT: .byte 3 |
| Nick Lewycky | cc64ae1 | 2011-10-28 05:29:47 +0000 | [diff] [blame] | 38 | ; DARWIN-NEXT: .quad _yyyy |
| Eric Christopher | 7524fe4 | 2012-03-02 00:30:24 +0000 | [diff] [blame] | 39 | |
| 40 | ; Verify that "yyyy" ended up in the stringpool. |
| 41 | ; LINUX: .section .debug_str,"MS",@progbits,1 |
| 42 | ; LINUX-NOT: .section |
| 43 | ; LINUX: yyyy |
| 44 | ; DARWIN: .section __DWARF,__debug_str,regular,debug |
| 45 | ; DARWIN-NOT: .section |
| 46 | ; DARWIN: yyyy |