diff options
author | James Henderson <james.henderson@sony.com> | 2020-02-11 14:11:01 +0000 |
---|---|---|
committer | James Henderson <james.henderson@sony.com> | 2020-02-12 14:49:22 +0000 |
commit | 1da62b51a5f00a4b84843f3ecc8a495de618afc8 (patch) | |
tree | 904317af5cefe47d8e6b43d9eaae281479f59e97 /llvm/lib/DebugInfo | |
parent | 61b35e4111160fe834a00c33d040e01150b576ac (diff) | |
download | llvm-1da62b51a5f00a4b84843f3ecc8a495de618afc8.zip llvm-1da62b51a5f00a4b84843f3ecc8a495de618afc8.tar.gz llvm-1da62b51a5f00a4b84843f3ecc8a495de618afc8.tar.bz2 |
[DebugInfo] Print version in error message in decimal
Also remove some test duplication and add a test case that shows the
maximum version is rejected (this also shows that the value in the error
message is actually in decimal, and not just missing an 0x prefix).
Reviewed by: dblaikie
Differential Revision: https://reviews.llvm.org/D74403
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp index d3d2c58..2b4c492 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -331,10 +331,11 @@ Error DWARFDebugLine::Prologue::parse( // Treat this error as unrecoverable - we cannot be sure what any of // the data represents including the length field, so cannot skip it or make // any reasonable assumptions. - return createStringError(errc::not_supported, - "parsing line table prologue at offset 0x%8.8" PRIx64 - " found unsupported version 0x%2.2" PRIx16, - PrologueOffset, getVersion()); + return createStringError( + errc::not_supported, + "parsing line table prologue at offset 0x%8.8" PRIx64 + " found unsupported version %" PRIu16, + PrologueOffset, getVersion()); if (getVersion() >= 5) { FormParams.AddrSize = DebugLineData.getU8(OffsetPtr); |