OSDN Git Service

[libc++] Fix the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT setting
authorLouis Dionne <ldionne@apple.com>
Fri, 15 May 2020 19:58:19 +0000 (15:58 -0400)
committerLouis Dionne <ldionne@apple.com>
Fri, 29 May 2020 10:14:30 +0000 (06:14 -0400)
commitd0fcdcd28f95d699b27d2026ede964a7f9cff9dd
treeb78e1aef89f7f41c4fb619dc35f9c6cc188a417b
parent1bfc58e6557cd3f3c310de214f316469c20c1476
[libc++] Fix the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT setting

When the __config_site header is generated, but LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
wasn't specified, _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT would be defined
to 0, which was the NonUnique RTTI comparison implementation. The intent
was to use the Unique RTTI comparison implementation in that case, which
caused https://llvm.org/PR45549.

Instead, use a proper "switch" to select the RTTI comparison implementation.
Note that 0 can't be used as a value, because that is treated the same
by CMake as a variable that is just not defined.

Differential Revision: https://reviews.llvm.org/D80037
libcxx/CMakeLists.txt
libcxx/cmake/caches/Apple.cmake
libcxx/docs/BuildingLibcxx.rst
libcxx/include/__config
libcxx/include/__config_site.in
libcxx/include/typeinfo
libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp
libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp