OSDN Git Service

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)
commit019c097d1b3a826a504c84de6a5f48655be30266
treedd774aeca3c965871c6fe50a232dac7e4671240a
parent583a1536624a76a0041da0e8fb790f72c819d37e
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227108 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Format.h
lib/Support/raw_ostream.cpp
unittests/Support/raw_ostream_test.cpp