summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/Twine.h7
-rw-r--r--lib/Support/Twine.cpp3
-rw-r--r--unittests/ADT/TwineTest.cpp3
3 files changed, 2 insertions, 11 deletions
diff --git a/include/llvm/ADT/Twine.h b/include/llvm/ADT/Twine.h
index 6c4905e643..cb5bb4d7b9 100644
--- a/include/llvm/ADT/Twine.h
+++ b/include/llvm/ADT/Twine.h
@@ -303,13 +303,6 @@ namespace llvm {
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
/// @{
diff --git a/lib/Support/Twine.cpp b/lib/Support/Twine.cpp
index 2b0cf062ec..83a3a6180f 100644
--- a/lib/Support/Twine.cpp
+++ b/lib/Support/Twine.cpp
@@ -60,8 +60,7 @@ void Twine::printOneChild(raw_ostream &OS, const void *Ptr,
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));
break;
}
}
diff --git a/unittests/ADT/TwineTest.cpp b/unittests/ADT/TwineTest.cpp
index 9a31901864..61e8a0ac37 100644
--- a/unittests/ADT/TwineTest.cpp
+++ b/unittests/ADT/TwineTest.cpp
@@ -39,8 +39,7 @@ TEST(TwineTest, Numbers) {
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) {