[llvm] r306039 - MC: Fix dumping of MCFragment values
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 10:57:02 PDT 2017
Author: sbc
Date: Thu Jun 22 12:57:01 2017
New Revision: 306039
URL: http://llvm.org/viewvc/llvm-project?rev=306039&view=rev
Log:
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
Modified:
llvm/trunk/lib/MC/MCFragment.cpp
Modified: llvm/trunk/lib/MC/MCFragment.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCFragment.cpp?rev=306039&r1=306038&r2=306039&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCFragment.cpp (original)
+++ llvm/trunk/lib/MC/MCFragment.cpp Thu Jun 22 12:57:01 2017
@@ -382,7 +382,8 @@ LLVM_DUMP_METHOD void MCFragment::dump()
}
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()
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: {
More information about the llvm-commits
mailing list