Always compare C++ typeinfo (based on libstdc++ implementation).
Differential Revision: https://reviews.llvm.org/D58028 llvm-svn: 355488
This commit is contained in:
parent
af92b7a3b8
commit
a25a2c7c9a
|
@ -285,10 +285,10 @@
|
|||
# define MSC_PREREQ(version) 0
|
||||
#endif
|
||||
|
||||
#if defined(__arm64__) && SANITIZER_IOS
|
||||
# define SANITIZER_NON_UNIQUE_TYPEINFO 1
|
||||
#else
|
||||
#if SANITIZER_MAC && !(defined(__arm64__) && SANITIZER_IOS)
|
||||
# define SANITIZER_NON_UNIQUE_TYPEINFO 0
|
||||
#else
|
||||
# define SANITIZER_NON_UNIQUE_TYPEINFO 1
|
||||
#endif
|
||||
|
||||
// On linux, some architectures had an ABI transition from 64-bit long double
|
||||
|
|
|
@ -118,6 +118,7 @@ static bool isDerivedFromAtOffset(const abi::__class_type_info *Derived,
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue