25#ifndef LLVM_SUPPORT_FORMATVARIADIC_H
26#define LLVM_SUPPORT_FORMATVARIADIC_H
83 for (
const auto &R : Replacements) {
96 Align.format(S, R.Options);
121 operator std::string()
const {
return str(); }
129 std::array<support::detail::format_adapter *, std::tuple_size<Tuple>::value>
139 struct create_adapters {
140 template <
typename... Ts>
141 std::array<support::detail::format_adapter *, std::tuple_size<Tuple>::value>
142 operator()(Ts &...Items) {
143 return {{&Items...}};
150 Parameters(
std::
move(Params)) {
151 ParameterPointers = std::apply(create_adapters(), Parameters);
158 Parameters(
std::
move(rhs.Parameters)) {
159 ParameterPointers = std::apply(create_adapters(), Parameters);
252template <
typename... Ts>
253inline auto formatv(
bool Validate,
const char *Fmt, Ts &&...Vals) {
254 auto Params = std::make_tuple(
260template <
typename... Ts>
inline auto formatv(
const char *Fmt, Ts &&...Vals) {
261 return formatv<Ts...>(
true, Fmt, std::forward<Ts>(Vals)...);
This file defines the SmallString class.
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an std::string.
A raw_ostream that writes to an SmallVector or SmallString.
std::enable_if_t< uses_format_member< T >::value, T > build_format_adapter(T &&Item)
This is an optimization pass for GlobalISel generic memory operations.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Helper class to format to a Width wide field, with alignment Where within that field.
ReplacementItem(StringRef Literal)
ReplacementItem(StringRef Spec, unsigned Index, unsigned Width, AlignStyle Where, char Pad, StringRef Options)