From 82705e7d52b46ea6067cd75af6c16c695de99b1d Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 29 May 2019 02:38:19 +0000 Subject: [PATCH] Fix build breakage on 32-bit machines llvm-svn: 361917 --- libcxx/include/typeinfo | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo index 5d2f03e..2760176 100644 --- a/libcxx/include/typeinfo +++ b/libcxx/include/typeinfo @@ -237,7 +237,10 @@ struct __type_info_implementations { } private: - typedef std::integral_constant<__type_name_t, (1ULL << 63)> __non_unique_rtti_bit; + // The unique bit is the top bit. It is expected that __type_name_t is 64 bits when + // this implementation is actually used. + typedef std::integral_constant<__type_name_t, + (1ULL << ((__CHAR_BIT__ * sizeof(__type_name_t)) - 1))> __non_unique_rtti_bit; _LIBCPP_INLINE_VISIBILITY static bool __is_type_name_unique(__type_name_t __lhs) _NOEXCEPT { -- 2.7.4