llvm-project/libcxx/test
Eric Fiselier 0ed525382f [libc++] Shrink variant's index type when possible
Summary:
Currently `std::variant` always uses an unsigned int to store the variant index. However this isn't nessesary and causes `std::variant` to be larger than it needs to be in most cases.

This patch changes the index type to be `unsigned char` when possible, and `unsigned short` or `unsigned int` otherwise, depending on the size (Although it's questionable if it's even possible to create a variant with 65535 elements.

Unfortunately this change is an ABI break, and as such is only enabled in ABI v2.

Reviewers: mpark

Reviewed By: mpark

Subscribers: cfe-commits

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

llvm-svn: 318621
2017-11-19 04:19:44 +00:00
..
libcxx [libc++] Shrink variant's index type when possible 2017-11-19 04:19:44 +00:00
std More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in filesystem::path 2017-11-16 05:48:32 +00:00
support Rename identifiers named `__output` 2017-11-14 11:14:25 +00:00
CMakeLists.txt Resubmit "Fix llvm-lit script generation in libcxx." 2017-09-19 17:19:10 +00:00
lit.cfg Move libcxx/test/libcxx python package into libcxx/utils/libcxx. 2017-02-09 23:18:11 +00:00
lit.site.cfg.in [libc++][CMake] Use debug MSVC runtimes when libc++ is built in debug mode 2017-01-14 07:54:39 +00:00
nothing_to_do.pass.cpp Test commit: Reverting whitespace changes 2014-07-17 05:10:03 +00:00