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
4 @yyyy = common global i32 0, align 4
7 !llvm.module.flags = !{!9}
9 !0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143009)", isOptimized: true, emissionKind: 0, file: !8, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1)
12 !5 = !MDGlobalVariable(name: "yyyy", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: i32* @yyyy)
13 !6 = !MDFile(filename: "z.c", directory: "/home/nicholas")
14 !7 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
15 !8 = !MDFile(filename: "z.c", directory: "/home/nicholas")
17 ; Verify that "yyyy" ended up in the stringpool.
18 ; LINUX: .section .debug_str,"MS",@progbits,1
20 ; DARWIN: .section __DWARF,__debug_str,regular,debug
23 ; Verify that we refer to 'yyyy' with a relocation.
24 ; LINUX: .long .Linfo_string3 # DW_AT_name
25 ; LINUX-NEXT: .long {{[0-9]+}} # DW_AT_type
26 ; LINUX-NEXT: # DW_AT_external
27 ; LINUX-NEXT: .byte 1 # DW_AT_decl_file
28 ; LINUX-NEXT: .byte 1 # DW_AT_decl_line
29 ; LINUX-NEXT: .byte 9 # DW_AT_location
31 ; LINUX-NEXT: .quad yyyy
33 ; Verify that we refer to 'yyyy' without a relocation.
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
37 ; DARWIN-NEXT: ## DW_AT_external
38 ; DARWIN-NEXT: .byte 1 ## DW_AT_decl_file
39 ; DARWIN-NEXT: .byte 1 ## DW_AT_decl_line
40 ; DARWIN-NEXT: .byte 9 ## DW_AT_location
41 ; DARWIN-NEXT: .byte 3
42 ; DARWIN-NEXT: .quad _yyyy
43 !9 = !{i32 1, !"Debug Info Version", i32 3}