1 # RUN: yaml2obj %s | llvm-dwarfdump --statistics - | FileCheck %s
3 ## Check that zero coverage was reported for inlined variable with
4 ## DW_AT_abstract_origin with no location attribute as well as
5 ## for the variable that has not been generated within the inlined subroutine.
7 ## The yaml represents DWARF as:
10 ## DW_AT_low_pc (0x0000000000000000)
11 ## DW_TAG_subprogram <-- (0x00000014)
12 ## DW_AT_decl_file (0x01)
13 ## DW_AT_decl_line (1)
14 ## DW_AT_inline (DW_INL_inlined)
15 ## DW_TAG_formal_parameter <-- (0x00000018)
16 ## DW_AT_decl_file (0x01)
17 ## DW_AT_decl_line (1)
18 ## DW_TAG_formal_parameter <-- (0x0000001b)
19 ## DW_AT_decl_file (0x01)
20 ## DW_AT_decl_line (1)
21 ## DW_TAG_variable <-- (0x0000001e)
22 ## DW_AT_decl_file (0x01)
23 ## DW_AT_decl_line (1)
25 ## DW_AT_decl_file (0x01)
26 ## DW_AT_decl_line (1)
27 ## DW_AT_low_pc (0x0000000000000000)
28 ## DW_AT_high_pc (0x000000000000000b)
29 ## DW_TAG_inlined_subroutine
30 ## DW_AT_abstract_origin (0x00000014)
31 ## DW_AT_low_pc (0x0000000000000000)
32 ## DW_AT_high_pc (0x0000000000000007)
33 ## DW_AT_call_file (0x01)
34 ## DW_AT_call_line (1)
35 ## DW_AT_call_column (1)
36 ## DW_TAG_formal_parameter
37 ## DW_AT_abstract_origin (0x00000018)
39 ## DW_AT_abstract_origin (0x0000001e)
41 ## DW_TAG_inlined_subroutine
42 ## DW_AT_abstract_origin (0x00000014)
43 ## DW_AT_low_pc (0x0000000000000000)
44 ## DW_AT_high_pc (0x0000000000000007)
45 ## DW_AT_call_file (0x01)
46 ## DW_AT_call_line (1)
47 ## DW_AT_call_column (1)
48 ## DW_TAG_formal_parameter
49 ## DW_AT_abstract_origin (0x00000018)
52 ## DW_AT_abstract_origin (0x0000001e)
54 ## DW_TAG_inlined_subroutine
55 ## DW_AT_abstract_origin (0x00000014)
56 ## DW_AT_low_pc (0x0000000000000000)
57 ## DW_AT_high_pc (0x0000000000000007)
58 ## DW_AT_call_file (0x01)
59 ## DW_AT_call_line (1)
60 ## DW_AT_call_column (1)
61 ## DW_TAG_inlined_subroutine
62 ## DW_AT_abstract_origin (0x00000014)
63 ## DW_AT_low_pc (0x0000000000000002)
64 ## DW_AT_high_pc (0x000000000000000a)
65 ## DW_AT_call_file (0x01)
66 ## DW_AT_call_line (3)
67 ## DW_AT_call_column (3)
68 ## DW_TAG_inlined_subroutine
69 ## DW_AT_abstract_origin (0x000000e5)
70 ## DW_AT_low_pc (0x0000000000000006)
71 ## DW_AT_high_pc (0x0000000000000010)
72 ## DW_AT_call_file (0x01)
73 ## DW_AT_call_line (3)
74 ## DW_AT_call_column (3)
75 ## DW_TAG_inlined_subroutine
76 ## DW_AT_abstract_origin (0x000000e5)
77 ## DW_AT_low_pc (0x0000000000000006)
78 ## DW_AT_high_pc (0x0000000000000010)
79 ## DW_AT_call_file (0x01)
80 ## DW_AT_call_line (3)
81 ## DW_AT_call_column (3)
82 ## DW_TAG_formal_parameter
83 ## DW_AT_abstract_origin (0x000000e9)
85 ## DW_TAG_inlined_subroutine
86 ## DW_AT_abstract_origin (0x000000f0)
87 ## DW_AT_low_pc (0x0000000000000010)
88 ## DW_AT_high_pc (0x000000000000001a)
89 ## DW_AT_call_file (0x01)
90 ## DW_AT_call_line (3)
91 ## DW_AT_call_column (3)
92 ## DW_TAG_formal_parameter
93 ## DW_AT_abstract_origin (0x000000f4)
94 ## DW_TAG_lexical_block
95 ## DW_AT_low_pc (0x00000000000000bc)
96 ## DW_AT_high_pc (0x00000000000000bc)
98 ## DW_AT_abstract_origin (0x000000f8)
99 ## DW_TAG_subprogram <-- (0x000000e5)
100 ## DW_AT_decl_file (0x01)
101 ## DW_AT_decl_line (3)
102 ## DW_AT_inline (DW_INL_inlined)
103 ## DW_TAG_formal_parameter <-- (0x000000e9)
104 ## DW_AT_decl_file (0x01)
105 ## DW_AT_decl_line (1)
106 ## DW_TAG_variable <-- (0x000000be)
107 ## DW_AT_decl_file (0x01)
108 ## DW_AT_decl_line (1)
109 ## DW_TAG_subprogram <-- (0x000000f0)
110 ## DW_AT_decl_file (0x01)
111 ## DW_AT_decl_line (3)
112 ## DW_AT_inline (DW_INL_inlined)
113 ## DW_TAG_formal_parameter <--(0x000000f4)
114 ## DW_AT_decl_file (0x01)
115 ## DW_AT_decl_line (1)
116 ## DW_TAG_lexical_block
117 ## DW_TAG_variable <--(0x000000f8)
118 ## DW_AT_decl_file (0x01)
119 ## DW_AT_decl_line (1)
121 ## DW_AT_abstract_origin (0x000000f0)
123 # CHECK: "version": 9,
124 # CHECK: "#variables processed by location statistics": 17,
125 # CHECK: "#variables with 0% of parent scope covered by DW_AT_location": 13,
126 # CHECK: "#variables with 100% of parent scope covered by DW_AT_location": 4,
138 Tag: DW_TAG_compile_unit
139 Children: DW_CHILDREN_yes
141 - Attribute: DW_AT_low_pc
144 Tag: DW_TAG_subprogram
145 Children: DW_CHILDREN_yes
147 - Attribute: DW_AT_decl_file
149 - Attribute: DW_AT_decl_line
151 - Attribute: DW_AT_inline
154 Tag: DW_TAG_formal_parameter
155 Children: DW_CHILDREN_no
157 - Attribute: DW_AT_decl_file
159 - Attribute: DW_AT_decl_line
162 Tag: DW_TAG_formal_parameter
163 Children: DW_CHILDREN_no
165 - Attribute: DW_AT_decl_file
167 - Attribute: DW_AT_decl_line
171 Children: DW_CHILDREN_no
173 - Attribute: DW_AT_decl_file
175 - Attribute: DW_AT_decl_line
178 Tag: DW_TAG_subprogram
179 Children: DW_CHILDREN_yes
181 - Attribute: DW_AT_decl_file
183 - Attribute: DW_AT_decl_line
185 - Attribute: DW_AT_low_pc
187 - Attribute: DW_AT_high_pc
190 Tag: DW_TAG_inlined_subroutine
191 Children: DW_CHILDREN_yes
193 - Attribute: DW_AT_abstract_origin
195 - Attribute: DW_AT_low_pc
197 - Attribute: DW_AT_high_pc
199 - Attribute: DW_AT_call_file
201 - Attribute: DW_AT_call_line
203 - Attribute: DW_AT_call_column
206 Tag: DW_TAG_formal_parameter
207 Children: DW_CHILDREN_no
209 - Attribute: DW_AT_abstract_origin
213 Children: DW_CHILDREN_no
215 - Attribute: DW_AT_abstract_origin
217 - Attribute: DW_AT_location
218 Form: DW_FORM_exprloc
220 Tag: DW_TAG_formal_parameter
221 Children: DW_CHILDREN_no
223 - Attribute: DW_AT_abstract_origin
225 - Attribute: DW_AT_location
226 Form: DW_FORM_exprloc
228 Tag: DW_TAG_subprogram
229 Children: DW_CHILDREN_yes
231 - Attribute: DW_AT_decl_file
233 - Attribute: DW_AT_decl_line
235 - Attribute: DW_AT_inline
238 Tag: DW_TAG_formal_parameter
239 Children: DW_CHILDREN_no
241 - Attribute: DW_AT_decl_file
243 - Attribute: DW_AT_decl_line
246 Tag: DW_TAG_lexical_block
247 Children: DW_CHILDREN_yes
249 Tag: DW_TAG_lexical_block
250 Children: DW_CHILDREN_yes
252 - Attribute: DW_AT_low_pc
254 - Attribute: DW_AT_high_pc
257 Tag: DW_TAG_formal_parameter
258 Children: DW_CHILDREN_no
260 - Attribute: DW_AT_abstract_origin
264 Children: DW_CHILDREN_no
266 - Attribute: DW_AT_abstract_origin
269 Tag: DW_TAG_subprogram
270 Children: DW_CHILDREN_no
272 - Attribute: DW_AT_abstract_origin
278 - AbbrCode: 1 ## DW_TAG_compile_unit
280 - Value: 0x00 ## DW_AT_producer
281 - AbbrCode: 2 ## DW_TAG_subprogram
283 - Value: 1 ## DW_AT_decl_file
284 - Value: 1 ## DW_AT_decl_line
285 - Value: 1 ## DW_AT_inline
286 - AbbrCode: 3 ## DW_TAG_formal_parameter
288 - Value: 1 ## DW_AT_decl_file
289 - Value: 1 ## DW_AT_decl_line
290 - AbbrCode: 4 ## DW_TAG_formal_parameter
292 - Value: 1 ## DW_AT_decl_file
293 - Value: 1 ## DW_AT_decl_line
294 - AbbrCode: 5 ## DW_TAG_variable
296 - Value: 1 ## DW_AT_decl_file
297 - Value: 1 ## DW_AT_decl_line
298 - AbbrCode: 0 ## NULL
299 - AbbrCode: 6 ## DW_TAG_subprogram
301 - Value: 1 ## DW_AT_decl_file
302 - Value: 1 ## DW_AT_decl_line
303 - Value: 0x00 ## DW_AT_low_pc
304 - Value: 0x0b ## DW_AT_high_pc
305 - AbbrCode: 7 ## DW_TAG_inlined_subroutine
307 - Value: 0x14 ## DW_AT_abstract_origin
308 - Value: 0x00 ## DW_AT_low_pc
309 - Value: 0x07 ## DW_AT_high_pc
310 - Value: 1 ## DW_AT_call_file
311 - Value: 1 ## DW_AT_call_line
312 - Value: 1 ## DW_AT_call_column
313 - AbbrCode: 8 ## DW_TAG_formal_parameter
315 - Value: 0x18 ## DW_AT_abstract_origin
316 - AbbrCode: 9 ## DW_TAG_formal_parameter
318 - Value: 0x1e ## DW_AT_abstract_origin
319 - Value: 0x0 ## DW_AT_location
320 - AbbrCode: 0 ## NULL
321 - AbbrCode: 7 ## DW_TAG_inlined_subroutine
323 - Value: 0x14 ## DW_AT_abstract_origin
324 - Value: 0x02 ## DW_AT_low_pc
325 - Value: 0x08 ## DW_AT_high_pc
326 - Value: 1 ## DW_AT_call_file
327 - Value: 2 ## DW_AT_call_line
328 - Value: 2 ## DW_AT_call_column
329 - AbbrCode: 10 ## DW_TAG_formal_parameter
331 - Value: 0x18 ## DW_AT_abstract_origin
332 - Value: 0x0 ## DW_AT_location
333 - AbbrCode: 9 ## DW_TAG_variable
335 - Value: 0x1e ## DW_AT_abstract_origin
336 - Value: 0x0 ## DW_AT_location
337 - AbbrCode: 0 ## NULL
338 - AbbrCode: 7 ## DW_TAG_inlined_subroutine
340 - Value: 0x14 ## DW_AT_abstract_origin
341 - Value: 0x02 ## DW_AT_low_pc
342 - Value: 0x08 ## DW_AT_high_pc
343 - Value: 1 ## DW_AT_call_file
344 - Value: 3 ## DW_AT_call_line
345 - Value: 3 ## DW_AT_call_column
346 - AbbrCode: 0 ## NULL
347 - AbbrCode: 7 ## DW_TAG_inlined_subroutine
349 - Value: 0xe5 ## DW_AT_abstract_origin
350 - Value: 0x06 ## DW_AT_low_pc
351 - Value: 0x0a ## DW_AT_high_pc
352 - Value: 1 ## DW_AT_call_file
353 - Value: 3 ## DW_AT_call_line
354 - Value: 3 ## DW_AT_call_column
355 - AbbrCode: 0 ## NULL
356 - AbbrCode: 7 ## DW_TAG_inlined_subroutine
358 - Value: 0xe5 ## DW_AT_abstract_origin
359 - Value: 0x06 ## DW_AT_low_pc
360 - Value: 0x0a ## DW_AT_high_pc
361 - Value: 1 ## DW_AT_call_file
362 - Value: 3 ## DW_AT_call_line
363 - Value: 3 ## DW_AT_call_column
364 - AbbrCode: 10 ## DW_TAG_formal_parameter
366 - Value: 0xe9 ## DW_AT_abstract_origin
367 - Value: 0x0 ## DW_AT_location
368 - AbbrCode: 0 ## NULL
369 - AbbrCode: 7 ## DW_TAG_inlined_subroutine
371 - Value: 0xf0 ## DW_AT_abstract_origin
372 - Value: 0x10 ## DW_AT_low_pc
373 - Value: 0x0a ## DW_AT_high_pc
374 - Value: 1 ## DW_AT_call_file
375 - Value: 3 ## DW_AT_call_line
376 - Value: 3 ## DW_AT_call_column
377 - AbbrCode: 15 ## DW_TAG_formal_parameter
379 - Value: 0xf4 ## DW_AT_abstract_origin
380 - AbbrCode: 14 ## DW_TAG_lexical_block
382 - Value: 0xbc ## DW_AT_low_pc
383 - Value: 0x0 ## DW_AT_high_pc
384 - AbbrCode: 16 ## DW_TAG_variable
386 - Value: 0xf8 ## DW_AT_abstract_origin
387 - AbbrCode: 0 ## NULL
388 - AbbrCode: 0 ## NULL
389 - AbbrCode: 0 ## NULL
390 - AbbrCode: 2 ## DW_TAG_subprogram
392 - Value: 1 ## DW_AT_decl_file
393 - Value: 3 ## DW_AT_decl_line
394 - Value: 1 ## DW_AT_inline
395 - AbbrCode: 3 ## DW_TAG_formal_parameter
397 - Value: 1 ## DW_AT_decl_file
398 - Value: 1 ## DW_AT_decl_line
399 - AbbrCode: 5 ## DW_TAG_variable
401 - Value: 1 ## DW_AT_decl_file
402 - Value: 1 ## DW_AT_decl_line
403 - AbbrCode: 0 ## NULL
404 - AbbrCode: 11 ## DW_TAG_subprogram
406 - Value: 1 ## DW_AT_decl_file
407 - Value: 3 ## DW_AT_decl_line
408 - Value: 1 ## DW_AT_inline
409 - AbbrCode: 3 ## DW_TAG_formal_parameter
411 - Value: 1 ## DW_AT_decl_file
412 - Value: 1 ## DW_AT_decl_line
413 - AbbrCode: 13 ## DW_TAG_lexical_block
414 - AbbrCode: 5 ## DW_TAG_variable
416 - Value: 1 ## DW_AT_decl_file
417 - Value: 1 ## DW_AT_decl_line
418 - AbbrCode: 0 ## NULL
419 - AbbrCode: 0 ## NULL
420 - AbbrCode: 17 ## DW_TAG_subprogram
422 - Value: 0xf0 ## DW_AT_abstract_origin
423 - AbbrCode: 0 ## NULL