llvm-capstone/libcxx
Eric Fiselier db381405ce Fix EBO on std::optional and std::variant when targeting the MSVC ABI
Committing on behalf of davidben. Reviewed as D146190

Patch originally by Jan Dörrie in https://reviews.llvm.org/D120064. I've just updated it to include tests, and update documentation that MSVC ABI is not stable.

In the current implementation both `std::optional` and `std::variant` don't perform the EBO on MSVC's ABI. This is because both classes inherit from multiple empty base classes, which breaks the EBO for MSVC. This patch fixes this issue by applying the `empty_bases` declspec attribute, which is already used to fix a similar issue for `std::tuple`.

See https://reviews.llvm.org/D120064 for discussion on MSVC ABI stability. From the discussion, libc++ doesn't have users that expect a stable ABI on MSVC. The fix is thus applied unconditionally to benefit more users. Documentation has been updated to reflect this.

Fixes https://github.com/llvm/llvm-project/issues/61095.
2023-04-27 21:04:04 -04:00
..
benchmarks [libc++abi] Improve performance of __dynamic_cast 2023-03-19 10:04:34 +01:00
cmake [libc++][PSTL] Integrate the headers and add a CI job 2023-04-26 13:11:25 -07:00
docs Fix EBO on std::optional and std::variant when targeting the MSVC ABI 2023-04-27 21:04:04 -04:00
include Fix EBO on std::optional and std::variant when targeting the MSVC ABI 2023-04-27 21:04:04 -04:00
lib [libc++] Remove symbols for a std::allocator_arg & friends from the dylib 2023-04-19 17:27:14 -04:00
src [libc++] Make bsd_locale_fallbacks.h modular and move it into __locale/locale_base_api/ 2023-04-21 05:36:41 +02:00
test Fix EBO on std::optional and std::variant when targeting the MSVC ABI 2023-04-27 21:04:04 -04:00
utils [libc++][PSTL][NFC] Rename to pstl/ to __pstl/ 2023-04-27 13:33:03 -07:00
.clang-format [libc++] Remove _LIBCPP_CONSTEVAL 2023-03-10 09:04:48 -05:00
.clang-tidy [libc++] Enable radability-identifier-naming for local variables and fix any problems 2023-02-11 20:03:53 +01:00
.gitignore
appveyor-reqs-install.cmd
appveyor.yml
CMakeLists.txt [libc++][PSTL] Integrate the headers and add a CI job 2023-04-26 13:11:25 -07:00
CREDITS.TXT
LICENSE.TXT
TODO.TXT