Pārlūkot izejas kodu

Fix build breakage on 32-bit machines

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@361917 91177308-0d34-0410-b5e6-96231b3b80d8
Eric Fiselier 6 gadi atpakaļ
vecāks
revīzija
fd386ddbbc
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      include/typeinfo

+ 4 - 1
include/typeinfo

@@ -237,7 +237,10 @@ struct __type_info_implementations {
     }
     }
 
 
    private:
    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
     _LIBCPP_INLINE_VISIBILITY
     static bool __is_type_name_unique(__type_name_t __lhs) _NOEXCEPT {
     static bool __is_type_name_unique(__type_name_t __lhs) _NOEXCEPT {