aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2020-03-03 18:57:18 +0100
committerPavel Labath <pavel@labath.sk>2020-03-04 13:01:34 +0100
commita8bc9c3f0fe68e61790931e3de28f24f73d4fd37 (patch)
treefc357da4c1c286dbd914c5b8252e9f8b221a9aee /llvm/lib
parenteb2b17eea7785bb790dab11cff1e3365cd3218cc (diff)
downloadllvm-a8bc9c3f0fe68e61790931e3de28f24f73d4fd37.zip
llvm-a8bc9c3f0fe68e61790931e3de28f24f73d4fd37.tar.gz
llvm-a8bc9c3f0fe68e61790931e3de28f24f73d4fd37.tar.bz2
Use new DWARFDataExtractor::getInitialLength in DWARFVerifier
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
index 68bacbf..c96dceb 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
@@ -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) {