OSDN Git Service

[Support] Introduce llvm::formatv() function.
authorZachary Turner <zturner@google.com>
Fri, 11 Nov 2016 23:57:40 +0000 (23:57 +0000)
committerZachary Turner <zturner@google.com>
Fri, 11 Nov 2016 23:57:40 +0000 (23:57 +0000)
commit97dac2b41d59c6577ff4ad647e766eefcfd84d98
tree7ab5cd0668ce8b908828fd35a1aaf77d6f3e27e0
parentcccd305c0d05da191811e1b15b419ef7ac731881
[Support] Introduce llvm::formatv() function.

This introduces a new type-safe general purpose formatting
library.  It provides compile-time type safety, does not require
a format specifier (since the type is deduced), and provides
mechanisms for extending the format capability to user defined
types, and overriding the formatting behavior for existing types.

This patch additionally adds documentation for the API to the
LLVM programmer's manual.

Mailing List Thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105836.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286682 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
docs/ProgrammersManual.rst
include/llvm/ADT/STLExtras.h
include/llvm/Support/FormatAdapters.h [new file with mode: 0644]
include/llvm/Support/FormatCommon.h [new file with mode: 0644]
include/llvm/Support/FormatProviders.h [new file with mode: 0644]
include/llvm/Support/FormatVariadic.h [new file with mode: 0644]
include/llvm/Support/FormatVariadicDetails.h [new file with mode: 0644]
include/llvm/Support/NativeFormatting.h
include/llvm/Support/YAMLTraits.h
include/llvm/Support/raw_ostream.h
lib/Support/CMakeLists.txt
lib/Support/FormatVariadic.cpp [new file with mode: 0644]
lib/Support/NativeFormatting.cpp
lib/Support/raw_ostream.cpp
unittests/Support/CMakeLists.txt
unittests/Support/FormatVariadicTest.cpp [new file with mode: 0644]
unittests/Support/NativeFormatTests.cpp