[PATCH] D38599: Remove warnings for dynamic_cast fallback.

Ryan Prichard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 10 14:37:21 PDT 2017


rprichard added a comment.

I assume std::type_info::operator== also needs to be adjusted to compare string names? It looks like libc++'s version of the function does string comparisons for ARM64 iOS, but only on some classes (e.g. public(?) ones). Look for the _LIBCPP_HAS_NONUNIQUE_TYPEINFO and _LIBCPP_NONUNIQUE_RTTI_BIT flags. I wonder if ARM64 iOS also sets _LIBCXX_DYNAMIC_FALLBACK for libc++abi.

I noticed that Clang on GNU/Linux is treating two classes defined in separate anonymous namespaces as equal for std::type_info::operator== and dynamic_cast, which I *think* is a Clang bug. G++ marks the typeinfo names with an asterisk to disable the string comparisons. I'd expect that enabling _LIBCXX_DYNAMIC_FALLBACK would introduce the same bug into the Android toolchain.


Repository:
  rL LLVM

https://reviews.llvm.org/D38599





More information about the cfe-commits mailing list