25#ifndef LLVM_SUPPORT_FORMATVARIADIC_H
26#define LLVM_SUPPORT_FORMATVARIADIC_H
82 for (
const auto &R : Replacements) {
95 Align.format(S, R.Options);
120 operator std::string()
const {
return str(); }
128 std::array<support::detail::format_adapter *, std::tuple_size<Tuple>::value>
138 struct create_adapters {
139 template <
typename... Ts>
140 std::array<support::detail::format_adapter *, std::tuple_size<Tuple>::value>
141 operator()(Ts &...Items) {
142 return {{&Items...}};
149 Parameters(
std::
move(Params)) {
150 ParameterPointers = std::apply(create_adapters(), Parameters);
157 Parameters(
std::
move(rhs.Parameters)) {
158 ParameterPointers = std::apply(create_adapters(), Parameters);
251template <
typename... Ts>
252inline auto formatv(
bool Validate,
const char *Fmt, Ts &&...Vals) {
253 auto Params = std::make_tuple(
259template <
typename... Ts>
inline auto formatv(
const char *Fmt, Ts &&...Vals) {
260 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)