1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

Use new DWARFDataExtractor::getInitialLength in DWARFVerifier

This commit is contained in:
Pavel Labath 2020-03-03 18:57:18 +01:00
parent 9ccd43f14c
commit bd8f009db3

View File

@ -112,11 +112,9 @@ bool DWARFVerifier::verifyUnitHeader(const DWARFDataExtractor DebugInfoData,
bool ValidAbbrevOffset = true;
uint64_t OffsetStart = *Offset;
Length = DebugInfoData.getU32(Offset);
if (Length == dwarf::DW_LENGTH_DWARF64) {
Length = DebugInfoData.getU64(Offset);
isUnitDWARF64 = true;
}
DwarfFormat Format;
std::tie(Length, Format) = DebugInfoData.getInitialLength(Offset);
isUnitDWARF64 = Format == DWARF64;
Version = DebugInfoData.getU16(Offset);
if (Version >= 5) {