1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Use new DWARFDataExtractor::getInitialLength in DWARFDebugPubTable

This commit is contained in:
Pavel Labath 2020-03-03 18:51:12 +01:00
parent 0777f5891c
commit 5b780ab14f

View File

@ -28,12 +28,8 @@ DWARFDebugPubTable::DWARFDebugPubTable(const DWARFObject &Obj,
Sets.push_back({});
Set &SetData = Sets.back();
dwarf::DwarfFormat Format = dwarf::DWARF32;
SetData.Length = PubNames.getU32(&Offset);
if (SetData.Length == dwarf::DW_LENGTH_DWARF64) {
Format = dwarf::DWARF64;
SetData.Length = PubNames.getU64(&Offset);
}
dwarf::DwarfFormat Format;
std::tie(SetData.Length, Format) = PubNames.getInitialLength(&Offset);
const unsigned OffsetSize = dwarf::getDwarfOffsetByteSize(Format);
SetData.Version = PubNames.getU16(&Offset);