[Debug-Info][llvm-dwarfdump] Don't use DW_FORM_data4/8
authorEsme-Yi <esme.yi@ibm.com>
Mon, 26 Jul 2021 03:47:02 +0000 (03:47 +0000)
committerEsme-Yi <esme.yi@ibm.com>
Mon, 26 Jul 2021 03:47:02 +0000 (03:47 +0000)
commit0d3e4d9d4d2c9e29f5bd073340588f3c4931fb7c
treeadf6915005c5e9a4b58a5ccceac00b5643d77a5e
parent3211eadfe09acde35264b5a4f7e39579a1f650bb
[Debug-Info][llvm-dwarfdump] Don't use DW_FORM_data4/8
to encode the constants for DW_AT_data_member_location.

Summary: In DWARF v3, DW_FORM_data4/8 in
DW_AT_data_member_location are interpreted as location
list pointers. Interpreting constants as pointers is
not expected, so we use DW_FORM_udata to encode the
constants.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D105687
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/test/DebugInfo/MSP430/dwarf-basics.ll
llvm/test/DebugInfo/PowerPC/data_member_location_dwarf3.ll [new file with mode: 0644]