[libcxx-commits] [PATCH] D97802: [libc++] Fix incorrect typeinfo comparison on ARM64
Marek Kurdej via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 1 06:33:38 PDT 2021
curdeius added inline comments.
================
Comment at: libcxx/include/typeinfo:258-262
+ if (!__is_type_name_unique(__lhs) && !__is_type_name_unique(__rhs))
+ return __builtin_strcmp(__type_name_to_string(__lhs), __type_name_to_string(__rhs)) == 0;
+ // Either both are unique and have a different address, or one of them
+ // is unique and the other one isn't. In both cases they are unequal.
+ return false;
----------------
To be consistent with `__lt` and so that it reads easier, I propose negating the condition.
Unless you think that the codegen can be worse.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97802/new/
https://reviews.llvm.org/D97802
More information about the libcxx-commits
mailing list