9#ifndef LLVM_SUPPORT_FORMATVARIADICDETAILS_H
10#define LLVM_SUPPORT_FORMATVARIADICDETAILS_H
24 virtual void anchor();
50 : Item(
std::forward<
T>(Item)) {}
70 template <
typename U>
static double test(...);
73 (
sizeof(test<llvm::format_provider<Decayed>>(
nullptr)) == 1);
83 std::enable_if_t<std::is_same<
decltype(std::declval<llvm::raw_ostream &>()
84 << std::declval<U>()),
88 template <
typename U>
static double test(...);
90 static bool const value = (
sizeof(test<ConstRefT>(
nullptr)) == 1);
97 :
public std::integral_constant<
99 std::is_base_of<format_adapter, std::remove_reference_t<T>>::value> {
107 :
public std::integral_constant<
108 bool, !uses_format_member<T>::value && has_FormatProvider<T>::value> {
115 :
public std::integral_constant<bool, !uses_format_member<T>::value &&
116 !uses_format_provider<T>::value &&
117 has_StreamOperator<T>::value> {};
125 :
public std::integral_constant<bool, !uses_format_member<T>::value &&
126 !uses_format_provider<T>::value &&
127 !uses_stream_operator<T>::value> {
131std::enable_if_t<uses_format_member<T>::value,
T>
133 return std::forward<T>(Item);
137std::enable_if_t<uses_format_provider<T>::value, provider_format_adapter<T>>
143std::enable_if_t<uses_stream_operator<T>::value,
144 stream_operator_format_adapter<T>>
150 !std::is_same<llvm::Error, std::remove_cv_t<T>>
::value,
151 "llvm::Error-by-value must be wrapped in fmt_consume() for formatv");
156std::enable_if_t<uses_missing_provider<T>::value, missing_format_adapter<T>>
Given that RA is a live value
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
const std::decay_t< T > & ConstRefT
static char test(std::enable_if_t< std::is_same< decltype(std::declval< llvm::raw_ostream & >()<< std::declval< U >()), llvm::raw_ostream & >::value, int * >)
This class implements an extremely fast bulk output stream that can only output to a stream.
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.