diff options
| author | Sam Clegg <sbc@chromium.org> | 2017-06-22 17:57:01 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2017-06-22 17:57:01 +0000 |
| commit | 58ad080ef00adc7bf05605a1bb0c432de51068d4 (patch) | |
| tree | 488295433983cc81e97f7dfe0a5c5b23a7f9c247 /llvm/lib | |
| parent | 8a7287e4c89f684bffc862fd44358615a7b3deaf (diff) | |
| download | bcm5719-llvm-58ad080ef00adc7bf05605a1bb0c432de51068d4.tar.gz bcm5719-llvm-58ad080ef00adc7bf05605a1bb0c432de51068d4.zip | |
MC: Fix dumping of MCFragment values
Without this cast the "char" overload of operator<< is
chosen and the values is output as an ascii rather than
an integer.
Differential Revision: https://reviews.llvm.org/D34486
llvm-svn: 306039
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/MCFragment.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCFragment.cpp b/llvm/lib/MC/MCFragment.cpp index a7b505b68a0..ba08d13f810 100644 --- a/llvm/lib/MC/MCFragment.cpp +++ b/llvm/lib/MC/MCFragment.cpp @@ -382,7 +382,8 @@ LLVM_DUMP_METHOD void MCFragment::dump() const { } case MCFragment::FT_Fill: { const MCFillFragment *FF = cast<MCFillFragment>(this); - OS << " Value:" << FF->getValue() << " Size:" << FF->getSize(); + OS << " Value:" << static_cast<unsigned>(FF->getValue()) + << " Size:" << FF->getSize(); break; } case MCFragment::FT_Relaxable: { @@ -395,7 +396,8 @@ LLVM_DUMP_METHOD void MCFragment::dump() const { case MCFragment::FT_Org: { const MCOrgFragment *OF = cast<MCOrgFragment>(this); OS << "\n "; - OS << " Offset:" << OF->getOffset() << " Value:" << OF->getValue(); + OS << " Offset:" << OF->getOffset() + << " Value:" << static_cast<unsigned>(OF->getValue()); break; } case MCFragment::FT_Dwarf: { |

