diff options
author | Paul Robinson <paul.robinson@sony.com> | 2018-03-22 19:37:56 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2018-03-22 19:37:56 +0000 |
commit | 7947468e69981a7c0f37d175370b1aa0ae28eaed (patch) | |
tree | 962f2df8497f9dded0282e8abcd219b0a2d5a4d6 /llvm/lib | |
parent | 2965a01e98c10563818a128a38721db5fb92e518 (diff) | |
download | bcm5719-llvm-7947468e69981a7c0f37d175370b1aa0ae28eaed.tar.gz bcm5719-llvm-7947468e69981a7c0f37d175370b1aa0ae28eaed.zip |
[DWARF] Replace assert with diagnostic. PR36868.
llvm-svn: 328235
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp index 69a6e7f4a94..dbe1185417a 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -551,8 +551,14 @@ bool DWARFDebugLine::LineTable::parse(DWARFDataExtractor &DebugLineData, // from the size of the operand. if (DebugLineData.getAddressSize() == 0) DebugLineData.setAddressSize(Len - 1); - else - assert(DebugLineData.getAddressSize() == Len - 1); + else if (DebugLineData.getAddressSize() != Len - 1) { + fprintf(stderr, "Mismatching address size at offset 0x%8.8" PRIx32 + " expected 0x%2.2" PRIx32 " found 0x%2.2" PRIx64 "\n", + ExtOffset, DebugLineData.getAddressSize(), Len - 1); + // Skip the rest of the line-number program. + *OffsetPtr = EndOffset; + return false; + } State.Row.Address = DebugLineData.getRelocatedAddress(OffsetPtr); if (OS) *OS << format(" (0x%16.16" PRIx64 ")", State.Row.Address); |