Teach raw_ostream to support hex formatting without a prefix '0x'.
authorZachary Turner <zturner@google.com>
Mon, 26 Jan 2015 18:21:33 +0000 (18:21 +0000)
committerZachary Turner <zturner@google.com>
Mon, 26 Jan 2015 18:21:33 +0000 (18:21 +0000)
commit39571b37a38d289f0895ca060eb1d6f579300af6
tree7110e3b78682eba2d4c67dc1864f8a4e9ddffd65
parent6ffc9bf6bafcb129300cac7ba333940609bf87c3
Teach raw_ostream to support hex formatting without a prefix '0x'.

Previously using format_hex() would always print a 0x prior to the
hex characters.  This allows this to be optional, so that one can
choose to print (e.g.) 255 as either 0xFF or just FF.

Differential Revision: http://reviews.llvm.org/D7151

llvm-svn: 227108
llvm/include/llvm/Support/Format.h
llvm/lib/Support/raw_ostream.cpp
llvm/unittests/Support/raw_ostream_test.cpp