9#ifndef LLVM_SUPPORT_FORMATVARIADICDETAILS_H
10#define LLVM_SUPPORT_FORMATVARIADICDETAILS_H
26 virtual void anchor();
52 : Item(
std::forward<
T>(Item)) {}
81 static char test(std::enable_if_t<
82 std::is_same_v<
decltype(std::declval<llvm::raw_ostream &>()
83 << std::declval<U>()),
87 template <
typename U>
static double test(...);
96 :
public std::bool_constant<
97 std::is_base_of_v<format_adapter, std::remove_reference_t<T>>> {};
104 :
public std::bool_constant<!uses_format_member<T>::value &&
105 has_FormatProvider<T>::value> {};
111 :
public std::bool_constant<!uses_format_member<T>::value &&
112 !uses_format_provider<T>::value &&
113 has_StreamOperator<T>::value> {};
121 :
public std::bool_constant<!uses_format_member<T>::value &&
122 !uses_format_provider<T>::value &&
123 !uses_stream_operator<T>::value> {};
126std::enable_if_t<uses_format_member<T>::value,
T>
128 return std::forward<T>(Item);
132std::enable_if_t<uses_format_provider<T>::value, provider_format_adapter<T>>
138std::enable_if_t<uses_stream_operator<T>::value,
139 stream_operator_format_adapter<T>>
145 !std::is_same_v<llvm::Error, std::remove_cv_t<T>>,
146 "llvm::Error-by-value must be wrapped in fmt_consume() for formatv");
151std::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.
typename detail::detector< void, Op, Args... >::value_t is_detected
Detects if a given trait holds for some set of arguments 'Args'.
Implement std::hash so that hash_code can be used in STL containers.