13 #ifndef LLVM_ADT_BIT_H 14 #define LLVM_ADT_BIT_H 18 #include <type_traits> 25 template <
typename To,
typename From 26 ,
typename =
typename std::enable_if<sizeof(To) == sizeof(From)>::type
27 #if (__has_feature(is_trivially_constructible) && defined(_LIBCPP_VERSION)) || \ 28 (defined(__GNUC__) && __GNUC__ >= 5) 29 ,
typename =
typename std::is_trivially_constructible<To>::type
30 #elif __has_feature(is_trivially_constructible) 31 ,
typename =
typename std::enable_if<__is_trivially_constructible(To)>::type
35 #if (__has_feature(is_trivially_copyable) && defined(_LIBCPP_VERSION)) || \ 36 (defined(__GNUC__) && __GNUC__ >= 5) 37 ,
typename =
typename std::enable_if<std::is_trivially_copyable<To>::value>
::type 38 ,
typename =
typename std::enable_if<std::is_trivially_copyable<From>::value>::type
39 #elif __has_feature(is_trivially_copyable) 40 ,
typename =
typename std::enable_if<__is_trivially_copyable(To)>::type
41 ,
typename =
typename std::enable_if<__is_trivially_copyable(From)>::type
50 inline To
bit_cast(
const From &from) noexcept {
52 std::memcpy(&to, &from,
sizeof(To));
This class represents lattice values for constants.
BlockVerifier::State From
To bit_cast(const From &from) noexcept