1 ## This test checks debug info for the types located into the
2 ## different compilation units from the single object file.
3 ## Type definition for the "class1" should be removed from the
4 ## second compilation unit.
6 # RUN: yaml2obj %s -o %t.o
7 # RUN: echo '---' > %t2.map
8 # RUN: echo "triple: 'x86_64-apple-darwin'" >> %t2.map
9 # RUN: echo 'objects:' >> %t2.map
10 # RUN: echo " - filename: '%t.o'" >> %t2.map
11 # RUN: echo ' symbols:' >> %t2.map
12 # RUN: echo ' - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map
13 # RUN: echo '...' >> %t2.map
14 # RUN: dsymutil -y %t2.map -f -o - | llvm-dwarfdump -a - | FileCheck %s
16 # CHECK: file format Mach-O 64-bit x86-64
17 # CHECK: .debug_info contents:
18 # CHECK: Compile Unit:
19 # CHECK: DW_TAG_compile_unit
20 # CHECK: DW_AT_name{{.*}}"CU1"
21 # CHECK: DW_TAG_class_type{{.*[[:space:]].*}}DW_AT_name{{.*}}"class1"
22 # CHECK: DW_TAG_variable
23 # CHECK: DW_AT_name{{.*}}"var1"
24 # CHECK: DW_AT_const_value
25 # CHECK: DW_AT_type (0x00000000[[CLASS1:[0-9a-f]*]]
27 # CHECK: Compile Unit:
28 # CHECK: DW_TAG_compile_unit
29 # CHECK: DW_AT_name{{.*}}"CU2"
30 # CHECK-NOT: DW_TAG_class_type
32 # CHECK: DW_TAG_variable
33 # CHECK: DW_AT_name{{.*}}"var2"
34 # CHECK: DW_AT_const_value
35 # CHECK: DW_AT_type (0x00000000[[CLASS1]]
43 cpusubtype: 0x00000003
62 - sectname: __debug_abbrev
64 addr: 0x000000000000000F
74 - sectname: __debug_info
76 addr: 0x000000000000100
120 - Tag: DW_TAG_compile_unit
121 Children: DW_CHILDREN_yes
123 - Attribute: DW_AT_producer
125 - Attribute: DW_AT_language
127 - Attribute: DW_AT_name
129 - Tag: DW_TAG_class_type
130 Children: DW_CHILDREN_no
132 - Attribute: DW_AT_name
134 - Tag: DW_TAG_variable
135 Children: DW_CHILDREN_no
137 - Attribute: DW_AT_name
139 - Attribute: DW_AT_const_value
141 - Attribute: DW_AT_type
144 - Tag: DW_TAG_compile_unit
145 Children: DW_CHILDREN_yes
147 - Attribute: DW_AT_producer
149 - Attribute: DW_AT_language
151 - Attribute: DW_AT_name
153 - Tag: DW_TAG_class_type
154 Children: DW_CHILDREN_no
156 - Attribute: DW_AT_name
158 - Tag: DW_TAG_variable
159 Children: DW_CHILDREN_no
161 - Attribute: DW_AT_name
163 - Attribute: DW_AT_const_value
165 - Attribute: DW_AT_type