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>
98 : std::is_copy_constructible<
99 ::llvm::detail::copy_construction_triviality_helper<T>> {};
109 : std::is_move_constructible<
110 ::llvm::detail::move_construction_triviality_helper<T>> {};
120 static auto get(
F*) ->
decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
121 static std::false_type
get(...);
128 static auto get(
F*) ->
decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
129 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.
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
An implementation of std::is_trivially_copy_constructible since we have users with STLs that don't ye...
An implementation of std::is_trivially_move_constructible since we have users with STLs that don't ye...
Internal utility to detect trivial copy construction.
copy_construction_triviality_helper()=default
~copy_construction_triviality_helper()=default
copy_construction_triviality_helper(const copy_construction_triviality_helper &)=default
Internal utility to detect trivial move construction.
move_construction_triviality_helper(move_construction_triviality_helper &&)=default
move_construction_triviality_helper()=default
~move_construction_triviality_helper()=default