9#ifndef LLVM_SUPPORT_FORMATVARIADICDETAILS_H
10#define LLVM_SUPPORT_FORMATVARIADICDETAILS_H
26 virtual void anchor();
52 : Item(
std::forward<
T>(Item)) {}
82 -> std::is_same<decltype(std::declval<llvm::raw_ostream &>()
83 << std::declval<U>()),
86 template <
typename U>
static auto test(...) -> std::false_type;
95 :
public std::is_base_of<format_adapter, std::remove_reference_t<T>> {};
102 :
public std::bool_constant<!uses_format_member<T>::value &&
103 has_FormatProvider<T>::value> {};
109 :
public std::bool_constant<!uses_format_member<T>::value &&
110 !uses_format_provider<T>::value &&
111 has_StreamOperator<T>::value> {};
119 :
public std::bool_constant<!uses_format_member<T>::value &&
120 !uses_format_provider<T>::value &&
121 !uses_stream_operator<T>::value> {};
124std::enable_if_t<uses_format_member<T>::value,
T>
126 return std::forward<T>(Item);
130std::enable_if_t<uses_format_provider<T>::value, provider_format_adapter<T>>
136std::enable_if_t<uses_stream_operator<T>::value,
137 stream_operator_format_adapter<T>>
143 !std::is_same_v<llvm::Error, std::remove_cv_t<T>>,
144 "llvm::Error-by-value must be wrapped in fmt_consume() for formatv");
149std::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.
static auto test(int) -> std::is_same< decltype(std::declval< llvm::raw_ostream & >()<< std::declval< U >()), llvm::raw_ostream & >
const std::decay_t< T > & ConstRefT
static auto test(...) -> std::false_type
static constexpr bool value
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.