13#ifndef LLVM_SUPPORT_TYPE_TRAITS_H
14#define LLVM_SUPPORT_TYPE_TRAITS_H
31 using UnderlyingT = std::remove_reference_t<T>;
35 !std::is_class_v<UnderlyingT> &&
36 !std::is_pointer_v<UnderlyingT> &&
37 !std::is_floating_point_v<UnderlyingT> &&
38 (std::is_enum_v<UnderlyingT> ||
39 std::is_convertible_v<UnderlyingT, unsigned long long>);
43template<
typename T,
typename Enable =
void>
48 T,
std::enable_if_t<std::is_pointer_v<T>>> {
54template<
typename T,
typename Enable =
void>
59 using type =
const std::remove_pointer_t<T> *;
62template <
typename T,
typename Enable =
void>
82 static auto get(
F*) ->
decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
83 static std::false_type
get(...);
90 static auto get(
F*) ->
decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
91 static std::false_type
get(...);
Metafunction that determines whether the given type is either an integral type or an enumeration type...
This is an optimization pass for GlobalISel generic memory operations.
Implement std::hash so that hash_code can be used in STL containers.
const std::remove_pointer_t< T > * type
If T is a pointer to X, return a pointer to const X.
If T is a pointer, just return it. If it is not, return T&.
typename add_const_past_pointer< T >::type type
static constexpr bool value
static auto get(F *) -> decltype(std::declval< F & >()=std::declval< const F & >(), std::true_type{})
static std::false_type get(...)
static std::false_type get(...)
static auto get(F *) -> decltype(std::declval< F & >()=std::declval< F && >(), std::true_type{})
static constexpr bool value