1 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \
2 # RUN: llvm-dwarfdump - | \
5 # This checks that the operand of DW_OP_call_ref is always parsed corresponding
6 # to the DWARF format of CU. Our code used to have an exception for verson == 2,
7 # where it treated the operand like it had the size of address, but since
8 # DW_OP_call_ref was introduced only in DWARF3, the code could be simplified.
10 # CHECK: DW_TAG_variable
11 # CHECK-NEXT: DW_AT_location (DW_OP_call_ref 0x11223344)
13 .section .debug_abbrev,"",@progbits
14 .byte 1 # Abbreviation Code
15 .byte 17 # DW_TAG_compile_unit
16 .byte 1 # DW_CHILDREN_yes
19 .byte 5 # Abbreviation Code
20 .byte 52 # DW_TAG_variable
21 .byte 0 # DW_CHILDREN_no
22 .byte 2 # DW_AT_location
23 .byte 10 # DW_FORM_block1
28 .section .debug_info,"",@progbits
29 .long .Lcu_end-.Lcu_start # Length of Unit
31 .short 2 # DWARF version number
32 .long .debug_abbrev # Offset Into Abbrev. Section
33 .byte 8 # Address Size (in bytes)
34 .byte 1 # Abbrev [1] DW_TAG_compile_unit
35 .byte 5 # Abbrev [5] DW_TAG_variable
36 .byte .Lloc_end-.Lloc_begin # DW_AT_location
38 .byte 154 # DW_OP_call_ref
39 .long 0x11223344 # Offset
41 .byte 0 # End Of Children Mark