summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-06-22 17:57:01 +0000
committerSam Clegg <sbc@chromium.org>2017-06-22 17:57:01 +0000
commit58ad080ef00adc7bf05605a1bb0c432de51068d4 (patch)
tree488295433983cc81e97f7dfe0a5c5b23a7f9c247 /llvm/lib
parent8a7287e4c89f684bffc862fd44358615a7b3deaf (diff)
downloadbcm5719-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.cpp6
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: {
OpenPOWER on IntegriCloud