14 #ifndef LLVM_SUPPORT_TYPE_TRAITS_H 15 #define LLVM_SUPPORT_TYPE_TRAITS_H 18 #include <type_traits> 22 #define LLVM_DEFINED_HAS_FEATURE 23 #define __has_feature(x) 0 35 #if (__has_feature(is_trivially_copyable) && defined(_LIBCPP_VERSION)) || \ 36 (defined(__GNUC__) && __GNUC__ >= 5) || defined(_MSC_VER) 39 static const bool value = std::is_trivially_copyable<T>::value;
40 #elif __has_feature(is_trivially_copyable) 44 static const bool value = __is_trivially_copyable(
T);
48 static const bool value = !std::is_class<T>::value;
53 template<
typename T,
typename U>
66 using UnderlyingT =
typename std::remove_reference<T>::type;
70 !std::is_class<UnderlyingT>::value &&
71 !std::is_pointer<UnderlyingT>::value &&
72 !std::is_floating_point<UnderlyingT>::value &&
73 (std::is_enum<UnderlyingT>::value ||
74 std::is_convertible<UnderlyingT, unsigned long long>::value);
78 template<
typename T,
typename Enable =
void>
83 T, typename
std::enable_if<std::is_pointer<T>::value>
::type> {
89 template<
typename T,
typename Enable =
void>
94 T, typename
std::enable_if<std::is_pointer<T>::value>
::type> {
95 using type =
const typename std::remove_pointer<T>::type *;
98 template <
typename T,
typename Enable =
void>
102 template <
typename T>
104 T, typename
std::enable_if<std::is_pointer<T>::value>
::type> {
127 template <
typename T>
129 : std::is_copy_constructible<
130 ::llvm::detail::copy_construction_triviality_helper<T>> {};
131 template <
typename T>
133 template <
typename T>
138 template <
typename T>
140 : std::is_move_constructible<
141 ::llvm::detail::move_construction_triviality_helper<T>> {};
142 template <
typename T>
144 template <
typename T>
152 #if __cplusplus >= 201402L || defined(_MSC_VER) 153 #define LLVM_IS_FINAL(Ty) std::is_final<Ty>() 154 #elif __has_feature(is_final) || LLVM_GNUC_PREREQ(4, 7, 0) 155 #define LLVM_IS_FINAL(Ty) __is_final(Ty) 158 #ifdef LLVM_DEFINED_HAS_FEATURE 162 #endif // LLVM_SUPPORT_TYPE_TRAITS_H This class represents lattice values for constants.
Metafunction that determines whether the given type is either an integral type or an enumeration type...
An implementation of std::is_trivially_move_constructible since we have users with STLs that don't ye...
An implementation of std::is_trivially_copy_constructible since we have users with STLs that don't ye...
If T is a pointer to X, return a pointer to const X.
isPodLike - This is a type trait that is used to determine whether a given type can be copied around ...
Internal utility to detect trivial copy construction.
If T is a pointer, just return it. If it is not, return T&.
typename add_const_past_pointer< T >::type type
const typename std::remove_pointer< T >::type * type
Internal utility to detect trivial move construction.