projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb2b17e
)
Use new DWARFDataExtractor::getInitialLength in DWARFVerifier
author
Pavel Labath
<pavel@labath.sk>
Tue, 3 Mar 2020 17:57:18 +0000
(18:57 +0100)
committer
Pavel Labath
<pavel@labath.sk>
Wed, 4 Mar 2020 12:01:34 +0000
(13:01 +0100)
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
index 68bacbfda4675a7e643d7a7f26ceda9f38c6571a..c96dcebf249486722b32c9f3ff81807b6e37cd38 100644
(file)
--- 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) {