[libcxx-commits] [PATCH] D130715: [libc++][AIX] Use non-unique implementation for typeinfo comparison
Xing Xue via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 28 09:26:50 PDT 2022
xingxue created this revision.
xingxue added reviewers: ldionne, Mordante, cebowleratibm, hubert.reinterpretcast, daltenty.
xingxue added a project: LLVM.
Herald added a subscriber: smeenai.
Herald added a project: All.
xingxue requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
The AIX linker does not merge `typeinfo`s when shared libraries are involved, which causes address comparison to fail although the types are the same. This patch changes to use the non-unique implementation for `typeinfo` comparison for AIX.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130715
Files:
libcxx/include/typeinfo
Index: libcxx/include/typeinfo
===================================================================
--- libcxx/include/typeinfo
+++ libcxx/include/typeinfo
@@ -174,8 +174,8 @@
// we pick a default implementation based on the platform here.
#ifndef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION
- // Windows binaries can't merge typeinfos, so use the NonUnique implementation.
-# ifdef _LIBCPP_OBJECT_FORMAT_COFF
+ // Windows or AIX binaries can't merge typeinfos, so use the NonUnique implementation.
+# if defined(_LIBCPP_OBJECT_FORMAT_COFF) || defined(_LIBCPP_OBJECT_FORMAT_XCOFF)
# define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 2
// On arm64 on Apple platforms, use the special NonUniqueARMRTTIBit implementation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130715.448358.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220728/3e3a7c30/attachment.bin>
More information about the libcxx-commits
mailing list