This is an archive of the discontinued LLVM Phabricator instance.

[lldb] remove unsigned Stream::operator<< overloads
ClosedPublic

Authored by labath on Nov 14 2019, 6:42 AM.

Details

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.

Diff Detail

Event Timeline

labath created this revision.Nov 14 2019, 6:42 AM
Herald added a project: Restricted Project. · View Herald Transcript
This revision is now accepted and ready to land.Nov 14 2019, 9:20 AM
This revision was automatically updated to reflect the committed changes.