[libcxx-commits] [PATCH] D104814: [libc++] Remove unnecessary reinterpret_cast from typeinfo
Fanbo Meng via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 28 07:00:51 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8d5c0b8768f7: [libc++] Remove unnecessary reinterpret_cast from typeinfo (authored by Jonathan.Crowther, committed by fanbo-meng).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104814/new/
https://reviews.llvm.org/D104814
Files:
libcxx/include/typeinfo
Index: libcxx/include/typeinfo
===================================================================
--- libcxx/include/typeinfo
+++ libcxx/include/typeinfo
@@ -249,7 +249,7 @@
_LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
static size_t __hash(__type_name_t __v) _NOEXCEPT {
if (__is_type_name_unique(__v))
- return reinterpret_cast<size_t>(__v);
+ return __v;
return __non_unique_impl::__hash(__type_name_to_string(__v));
}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104814.354887.patch
Type: text/x-patch
Size: 521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210628/5143266b/attachment-0001.bin>
More information about the libcxx-commits
mailing list