9#ifndef LLVM_SUPPORT_FORMATVARIADICDETAILS_H
10#define LLVM_SUPPORT_FORMATVARIADICDETAILS_H
26 virtual void anchor();
52 : Item(
std::forward<
T>(Item)) {}
72 template <
typename U>
static double test(...);
75 (
sizeof(test<llvm::format_provider<Decayed>>(
nullptr)) == 1);
84 static char test(std::enable_if_t<
85 std::is_same_v<
decltype(std::declval<llvm::raw_ostream &>()
86 << std::declval<U>()),
90 template <
typename U>
static double test(...);
92 static bool const value = (
sizeof(test<ConstRefT>(
nullptr)) == 1);
99 :
public std::integral_constant<
100 bool, std::is_base_of_v<format_adapter, std::remove_reference_t<T>>> {
108 :
public std::integral_constant<
109 bool, !uses_format_member<T>::value && has_FormatProvider<T>::value> {
116 :
public std::integral_constant<bool, !uses_format_member<T>::value &&
117 !uses_format_provider<T>::value &&
118 has_StreamOperator<T>::value> {};
126 :
public std::integral_constant<bool, !uses_format_member<T>::value &&
127 !uses_format_provider<T>::value &&
128 !uses_stream_operator<T>::value> {
132std::enable_if_t<uses_format_member<T>::value,
T>
134 return std::forward<T>(Item);
138std::enable_if_t<uses_format_provider<T>::value, provider_format_adapter<T>>
144std::enable_if_t<uses_stream_operator<T>::value,
145 stream_operator_format_adapter<T>>
151 !std::is_same_v<llvm::Error, std::remove_cv_t<T>>,
152 "llvm::Error-by-value must be wrapped in fmt_consume() for formatv");
157std::enable_if_t<uses_missing_provider<T>::value, missing_format_adapter<T>>
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
const std::decay_t< T > & ConstRefT
static char test(std::enable_if_t< std::is_same_v< decltype(std::declval< llvm::raw_ostream & >()<< std::declval< U >()), llvm::raw_ostream & >, int * >)
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.
Implement std::hash so that hash_code can be used in STL containers.