diff options
| author | Pavel Labath <pavel@labath.sk> | 2019-11-14 15:31:26 +0100 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2019-11-26 14:24:28 +0100 |
| commit | 957d9a0335b8199b01caec56574e72154c3a1226 (patch) | |
| tree | ef7e22f5d85a5e40167cee80f15df9fd852cf13f /lldb/source/Utility | |
| parent | 9b06897009dc32313354559c969d6cf0a564ec06 (diff) | |
| download | bcm5719-llvm-957d9a0335b8199b01caec56574e72154c3a1226.tar.gz bcm5719-llvm-957d9a0335b8199b01caec56574e72154c3a1226.zip | |
[lldb] remove unsigned Stream::operator<< overloads
Summary:
I recently re-discovered that the unsinged stream operators of the
lldb_private::Stream class have a surprising behavior in that they print
the number in hex. This is all the more confusing because the "signed"
versions of those operators behave normally.
Now that, thanks to Raphael, each Stream class has a llvm::raw_ostream
wrapper, I think we should delete most of our formatting capabilities
and just delegate to that. This patch tests the water by just deleting
the operators with the most surprising behavior.
Most of the code using these operators was printing user_id_t values. It
wasn't fully consistent about prefixing them with "0x", but I've tried
to consistenly print it without that prefix, to make it more obviously
different from pointer values.
Reviewers: teemperor, JDevlieghere, jdoerfert
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D70241
Diffstat (limited to 'lldb/source/Utility')
| -rw-r--r-- | lldb/source/Utility/Stream.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lldb/source/Utility/Stream.cpp b/lldb/source/Utility/Stream.cpp index c48a12acd90..991f7e924d8 100644 --- a/lldb/source/Utility/Stream.cpp +++ b/lldb/source/Utility/Stream.cpp @@ -160,30 +160,6 @@ Stream &Stream::operator<<(const void *p) { return *this; } -// Stream a uint8_t "uval" out to this stream. -Stream &Stream::operator<<(uint8_t uval) { - PutHex8(uval); - return *this; -} - -// Stream a uint16_t "uval" out to this stream. -Stream &Stream::operator<<(uint16_t uval) { - PutHex16(uval, m_byte_order); - return *this; -} - -// Stream a uint32_t "uval" out to this stream. -Stream &Stream::operator<<(uint32_t uval) { - PutHex32(uval, m_byte_order); - return *this; -} - -// Stream a uint64_t "uval" out to this stream. -Stream &Stream::operator<<(uint64_t uval) { - PutHex64(uval, m_byte_order); - return *this; -} - // Stream a int8_t "sval" out to this stream. Stream &Stream::operator<<(int8_t sval) { Printf("%i", static_cast<int>(sval)); |

