From f96e21ad6d84c49101f598d1eec8ff75a2ef15a5 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Mon, 6 Mar 2017 22:20:03 +0000 Subject: [DWARFv5] Update definitions to match published spec. Some late additions to DWARF v5 were not in Dwarf.def; also one form was redefined. Add the new cases to relevant switches in different parts of LLVM. Replace DW_FORM_ref_sup with DW_FORM_ref_sup[4,8]. I did not add support for DW_FORM_strx3/addrx3 other that defining the constants. We don't have any infrastructure to support these. Differential Revision: http://reviews.llvm.org/D30664 llvm-svn: 297085 --- llvm/lib/ObjectYAML/DWARFVisitor.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'llvm/lib/ObjectYAML/DWARFVisitor.cpp') diff --git a/llvm/lib/ObjectYAML/DWARFVisitor.cpp b/llvm/lib/ObjectYAML/DWARFVisitor.cpp index 8135b8bd651..cb9ad7a4cb8 100644 --- a/llvm/lib/ObjectYAML/DWARFVisitor.cpp +++ b/llvm/lib/ObjectYAML/DWARFVisitor.cpp @@ -105,18 +105,26 @@ template void DWARFYAML::VisitorImpl::traverseDebugInfo() { case dwarf::DW_FORM_data1: case dwarf::DW_FORM_ref1: case dwarf::DW_FORM_flag: + case dwarf::DW_FORM_strx1: + case dwarf::DW_FORM_addrx1: onValue((uint8_t)FormVal->Value); break; case dwarf::DW_FORM_data2: case dwarf::DW_FORM_ref2: + case dwarf::DW_FORM_strx2: + case dwarf::DW_FORM_addrx2: onValue((uint16_t)FormVal->Value); break; case dwarf::DW_FORM_data4: case dwarf::DW_FORM_ref4: + case dwarf::DW_FORM_ref_sup4: + case dwarf::DW_FORM_strx4: + case dwarf::DW_FORM_addrx4: onValue((uint32_t)FormVal->Value); break; case dwarf::DW_FORM_data8: case dwarf::DW_FORM_ref8: + case dwarf::DW_FORM_ref_sup8: onValue((uint64_t)FormVal->Value); break; case dwarf::DW_FORM_sdata: @@ -141,7 +149,6 @@ template void DWARFYAML::VisitorImpl::traverseDebugInfo() { case dwarf::DW_FORM_GNU_strp_alt: case dwarf::DW_FORM_line_strp: case dwarf::DW_FORM_strp_sup: - case dwarf::DW_FORM_ref_sup: onVariableSizeValue(FormVal->Value, getRefSize(Unit)); break; case dwarf::DW_FORM_ref_sig8: -- cgit v1.2.3