From: Sam Clegg Date: Thu, 22 Jun 2017 17:57:01 +0000 (+0000) Subject: MC: Fix dumping of MCFragment values X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff51fdebecedd32c4d5af9461ebced85a88e049f;p=llvm 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306039 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/MCFragment.cpp b/lib/MC/MCFragment.cpp index a7b505b68a0..ba08d13f810 100644 --- a/lib/MC/MCFragment.cpp +++ b/lib/MC/MCFragment.cpp @@ -382,7 +382,8 @@ LLVM_DUMP_METHOD void MCFragment::dump() const { } case MCFragment::FT_Fill: { const MCFillFragment *FF = cast(this); - OS << " Value:" << FF->getValue() << " Size:" << FF->getSize(); + OS << " Value:" << static_cast(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(this); OS << "\n "; - OS << " Offset:" << OF->getOffset() << " Value:" << OF->getValue(); + OS << " Offset:" << OF->getOffset() + << " Value:" << static_cast(OF->getValue()); break; } case MCFragment::FT_Dwarf: {