return Twine(&Val, UHexKind, 0, EmptyKind);
}
return Twine(&Val, UHexKind, 0, EmptyKind);
}
- // Construct a twine to print \arg Val as an unsigned hexadecimal
- // integer. This routine is provided as a convenience to sign extend values
- // before printing.
- static Twine itohexstr(const int64_t &Val) {
- return Twine(&Val, UHexKind, 0, EmptyKind);
- }
-
/// @}
/// @name String Operations
/// @{
/// @}
/// @name String Operations
/// @{
OS << *static_cast<const int64_t*>(Ptr);
break;
case Twine::UHexKind:
OS << *static_cast<const int64_t*>(Ptr);
break;
case Twine::UHexKind:
- // FIXME: Add raw_ostream functionality for this.
- OS << ::utohexstr(*static_cast<const uint64_t*>(Ptr));
+ OS.write_hex(*static_cast<const uint64_t*>(Ptr));
EXPECT_EQ("123", Twine((char) 123).str());
EXPECT_EQ("-123", Twine((signed char) -123).str());
EXPECT_EQ("123", Twine((char) 123).str());
EXPECT_EQ("-123", Twine((signed char) -123).str());
- EXPECT_EQ("7B", Twine::utohexstr(123).str());
- EXPECT_EQ("FFFFFFFFFFFFFF85", Twine::itohexstr(-123).str());
+ EXPECT_EQ("7b", Twine::utohexstr(123).str());
}
TEST(TwineTest, Concat) {
}
TEST(TwineTest, Concat) {