RTTI Uniqueness: remove __name_for_load function.
authorTim Northover <tnorthover@apple.com>
Thu, 3 Apr 2014 09:12:38 +0000 (09:12 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 3 Apr 2014 09:12:38 +0000 (09:12 +0000)
It's identical to name() these days. (At one point it avoided masking
of the RTTI uniqueness bit because ARM64 ignored it architecturally,
but no longer).

llvm-svn: 205518

libcxx/include/typeinfo

index 7fcc8244068afbfccbe273008d6792b097a3ee45..14ef77b31c3f63c74c2590a8e3e604a2f5e30cc9 100644 (file)
@@ -116,7 +116,7 @@ public:
         {return *reinterpret_cast<const size_t*>(&__type_name);}
 #else
         {if (!(__type_name & _LIBCPP_NONUNIQUE_RTTI_BIT)) return __type_name;
-         const char *__ptr = __name_for_load();
+         const char *__ptr = name();
          size_t __hash = 5381;
          while (unsigned char __c = static_cast<unsigned char>(*__ptr++))
            __hash = (__hash * 33) ^ __c;
@@ -141,15 +141,7 @@ public:
   private:
     _LIBCPP_INLINE_VISIBILITY
     int __compare_nonunique_names(const type_info &__arg) const _NOEXCEPT
-        {return __builtin_strcmp(__name_for_load(), __arg.__name_for_load());}
-
-    _LIBCPP_INLINE_VISIBILITY
-    const char *__name_for_load() const _NOEXCEPT
-        {uintptr_t __data = __type_name;
-#if 1
-         __data &= ~_LIBCPP_NONUNIQUE_RTTI_BIT;
-#endif
-         return reinterpret_cast<const char*>(__data);}
+        {return __builtin_strcmp(name(), __arg.name());}
 #endif
 };