13#ifndef LLVM_SUPPORT_TYPE_TRAITS_H
14#define LLVM_SUPPORT_TYPE_TRAITS_H
30 using UnderlyingT = std::remove_reference_t<T>;
34 !std::is_class_v<UnderlyingT> &&
35 !std::is_pointer_v<UnderlyingT> &&
36 !std::is_floating_point_v<UnderlyingT> &&
37 (std::is_enum_v<UnderlyingT> ||
38 std::is_convertible_v<UnderlyingT, unsigned long long>);
43 using type = std::conditional_t<std::is_pointer_v<T>,
T,
T &>;
49 using type = std::conditional_t<std::is_pointer_v<T>,
50 const std::remove_pointer_t<T> *,
const T>;
55 std::conditional_t<std::is_pointer_v<T>,
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.
If T is a pointer to X, return a pointer to const X.
std::conditional_t< std::is_pointer_v< T >, const std::remove_pointer_t< T > *, const T > type
If T is a pointer, just return it. If it is not, return T&.
std::conditional_t< std::is_pointer_v< T >, T, T & > type
std::conditional_t< std::is_pointer_v< T >, typename add_const_past_pointer< T >::type, const T & > type