diff options
author | Igor Kudrin <ikudrin@accesssoftek.com> | 2019-07-24 11:34:29 +0000 |
---|---|---|
committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2019-07-24 11:34:29 +0000 |
commit | 3daefb07448ae14ce7a4141b21cfe6ed1242e244 (patch) | |
tree | 063da3523b7661d987d465b38e5285b3e924808e /llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | |
parent | ec10d5c6c10cc7749f06e49359407907687fd771 (diff) | |
download | bcm5719-llvm-3daefb07448ae14ce7a4141b21cfe6ed1242e244.tar.gz bcm5719-llvm-3daefb07448ae14ce7a4141b21cfe6ed1242e244.zip |
[DWARF][NFC] Add constants for reserved values of an initial length field.
Differential Revision: https://reviews.llvm.org/D65039
llvm-svn: 366887
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp index d559935d53f..8b5b3033b0f 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -332,10 +332,10 @@ Error DWARFDebugLine::Prologue::parse(const DWARFDataExtractor &DebugLineData, clear(); TotalLength = DebugLineData.getRelocatedValue(4, OffsetPtr); - if (TotalLength == UINT32_MAX) { + if (TotalLength == dwarf::DW_LENGTH_DWARF64) { FormParams.Format = dwarf::DWARF64; TotalLength = DebugLineData.getU64(OffsetPtr); - } else if (TotalLength >= 0xfffffff0) { + } else if (TotalLength >= dwarf::DW_LENGTH_lo_reserved) { return createStringError(errc::invalid_argument, "parsing line table prologue at offset 0x%8.8" PRIx64 " unsupported reserved unit length found of value 0x%8.8" PRIx64, @@ -1126,7 +1126,8 @@ DWARFDebugLine::SectionParser::SectionParser(DWARFDataExtractor &Data, } bool DWARFDebugLine::Prologue::totalLengthIsValid() const { - return TotalLength == 0xffffffff || TotalLength < 0xfffffff0; + return TotalLength == dwarf::DW_LENGTH_DWARF64 || + TotalLength < dwarf::DW_LENGTH_lo_reserved; } DWARFDebugLine::LineTable DWARFDebugLine::SectionParser::parseNext( |