1 ## This test checks that thread local storage variables
4 # RUN: yaml2obj %s -o %t.o
5 # RUN: echo '---' > %t2.map
6 # RUN: echo "triple: 'x86_64-apple-darwin'" >> %t2.map
7 # RUN: echo 'objects:' >> %t2.map
8 # RUN: echo " - filename: '%t.o'" >> %t2.map
9 # RUN: echo ' symbols:' >> %t2.map
10 # RUN: echo ' - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map
11 # RUN: echo '...' >> %t2.map
12 # RUN: dsymutil -y %t2.map --keep-function-for-static -f -o - | llvm-dwarfdump -a - | FileCheck %s
13 # RUN: dsymutil --linker llvm -y %t2.map --keep-function-for-static -f -o - | llvm-dwarfdump -a - | FileCheck %s
15 # CHECK: file format Mach-O 64-bit x86-64
16 # CHECK: .debug_info contents:
17 # CHECK: Compile Unit:
18 # CHECK: DW_TAG_compile_unit
19 # CHECK: DW_AT_name{{.*}}"CU1"
20 # CHECK: DW_TAG_subprogram
21 # CHECK: DW_AT_name{{.*}}"foo"
22 # CHECK: DW_TAG_variable
23 # CHECK: DW_AT_name{{.*}}"var1"
24 # CHECK: DW_AT_location (DW_OP_const8u 0x{{.*}}, DW_OP_GNU_push_tls_address)
25 # CHECK: DW_AT_name{{.*}}"var2"
26 # CHECK: DW_AT_location (DW_OP_const8u 0x{{.*}}, DW_OP_form_tls_address)
32 cpusubtype: 0x00000003
51 - sectname: __debug_abbrev
53 addr: 0x000000000000000F
63 - sectname: __debug_info
65 addr: 0x000000000000100
117 - Tag: DW_TAG_compile_unit
118 Children: DW_CHILDREN_yes
120 - Attribute: DW_AT_producer
122 - Attribute: DW_AT_language
124 - Attribute: DW_AT_name
126 - Tag: DW_TAG_subprogram
127 Children: DW_CHILDREN_yes
129 - Attribute: DW_AT_name
131 - Attribute: DW_AT_type
133 - Tag: DW_TAG_variable
134 Children: DW_CHILDREN_no
136 - Attribute: DW_AT_name
138 - Attribute: DW_AT_type
140 - Attribute: DW_AT_location
141 Form: DW_FORM_exprloc
142 - Tag: DW_TAG_base_type
143 Children: DW_CHILDREN_no
145 - Attribute: DW_AT_name