Skip to content

Commit

Permalink
Use new DWARFDataExtractor::getInitialLength in DWARFUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
labath committed Mar 4, 2020
1 parent a8bc9c3 commit c957927
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
Expand Up @@ -262,12 +262,8 @@ bool DWARFUnitHeader::extract(DWARFContext &Context,
IndexEntry = Entry;
if (!IndexEntry && Index)
IndexEntry = Index->getFromOffset(*offset_ptr);
Length = debug_info.getRelocatedValue(4, offset_ptr, nullptr, &Err);
FormParams.Format = DWARF32;
if (Length == dwarf::DW_LENGTH_DWARF64) {
Length = debug_info.getU64(offset_ptr, &Err);
FormParams.Format = DWARF64;
}
std::tie(Length, FormParams.Format) =
debug_info.getInitialLength(offset_ptr, &Err);
FormParams.Version = debug_info.getU16(offset_ptr, &Err);
if (FormParams.Version >= 5) {
UnitType = debug_info.getU8(offset_ptr, &Err);
Expand Down

0 comments on commit c957927

Please sign in to comment.