OSDN Git Service

[Support] Add support for "advanced" number formatting.
authorZachary Turner <zturner@google.com>
Mon, 17 Oct 2016 20:57:45 +0000 (20:57 +0000)
committerZachary Turner <zturner@google.com>
Mon, 17 Oct 2016 20:57:45 +0000 (20:57 +0000)
commit0a7eca882956493fedeac54ec49aeb8bb0182571
treef2ed2329d1d8fc135f7a8fac77e25b35149fc55d
parent8cc4b69873a0a73ae69f20274f07889841eb4a46
[Support] Add support for "advanced" number formatting.

raw_ostream has not afforded a lot of flexibility in terms of
how to format numbers when outputting.  Wrap this all up into
a set of low level helper functions that can be used to output
numbers with arbitrary precision, alignment, format, etc and
then update raw_ostream to use these functions.

This will be useful for upcoming improvements to llvm's string
formatting libraries, but are still useful independently.

Differential Revision: https://reviews.llvm.org/D25497

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284425 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/NativeFormatting.h
lib/Support/NativeFormatting.cpp
lib/Support/raw_ostream.cpp
unittests/Support/CMakeLists.txt
unittests/Support/NativeFormatTests.cpp [new file with mode: 0644]