diff options
author | James Henderson <jh7370@my.bristol.ac.uk> | 2019-12-11 12:14:11 +0000 |
---|---|---|
committer | James Henderson <jh7370@my.bristol.ac.uk> | 2019-12-11 13:38:41 +0000 |
commit | 2f8155023ad49ca88151d954c1a6d6069b072ca3 (patch) | |
tree | 88fe1644940c601d136c5e2ffa901bc5fab7d1d7 /llvm/lib/DebugInfo/DWARF | |
parent | f95ef6a548211ffa6723e4ec923d37359a3bb9e1 (diff) | |
download | bcm5719-llvm-2f8155023ad49ca88151d954c1a6d6069b072ca3.tar.gz bcm5719-llvm-2f8155023ad49ca88151d954c1a6d6069b072ca3.zip |
[DebugInfo] Fix printing of DW_LNS_set_isa
The Isa register is a uint8_t, but at least on Windows this is
internally an unsigned char, which meant that prior to this patch it got
formatted as an ASCII character, rather than a decimal number. This
patch fixes this by casting it to a uint64_t before printing. I did it
this way instead of using a uint8_t formatter because a) it is simpler,
and b) it allows us to change the internal type of Isa in the future
without this code breaking.
I also took the opportunity to test the printing of the other standard
opcodes.
Reviewed by: probinson
Differential Revision: https://reviews.llvm.org/D71274
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp index dbee28ff5ab..a1835be344e 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -813,7 +813,7 @@ Error DWARFDebugLine::LineTable::parse( // column register of the state machine. State.Row.Isa = DebugLineData.getULEB128(OffsetPtr); if (OS) - *OS << " (" << State.Row.Isa << ")"; + *OS << " (" << (uint64_t)State.Row.Isa << ")"; break; default: |