Always compare C++ typeinfo (based on libstdc++ implementation).

Differential Revision: https://reviews.llvm.org/D56485.

llvm-svn: 352032
This commit is contained in:
Martin Liska 2019-01-24 08:25:36 +00:00
parent 7e37bf26d5
commit dc5c81330b
2 changed files with 1 additions and 7 deletions

View File

@ -285,12 +285,6 @@
# define MSC_PREREQ(version) 0
#endif
#if defined(__arm64__) && SANITIZER_IOS
# define SANITIZER_NON_UNIQUE_TYPEINFO 1
#else
# define SANITIZER_NON_UNIQUE_TYPEINFO 0
#endif
// On linux, some architectures had an ABI transition from 64-bit long double
// (ie. same as double) to 128-bit long double. On those, glibc symbols
// involving long doubles come in two versions, and we need to pass the

View File

@ -117,7 +117,7 @@ static bool isDerivedFromAtOffset(const abi::__class_type_info *Derived,
const abi::__class_type_info *Base,
sptr Offset) {
if (Derived->__type_name == Base->__type_name ||
(SANITIZER_NON_UNIQUE_TYPEINFO &&
(Derived->__type_name[0] != '*' &&
!internal_strcmp(Derived->__type_name, Base->__type_name)))
return Offset == 0;