llvm-project/libcxx/test
Eric Fiselier 7e6448bb02 Implement sized deallocation for std::allocator and friends.
Summary:
C++14 sized deallocation is disabled by default due to ABI concerns. However, when a user manually enables it then libc++ should take advantage of it since sized deallocation can provide a significant performance win depending on the underlying malloc implementation. (Note that libc++'s definitions of sized delete don't do anything special yet, but users are free to provide their own).

This patch updates __libcpp_deallocate to selectively call sized operator delete when it's available. `__libcpp_deallocate_unsized` should be used when the size of the allocation is unknown.

On Apple this patch makes no attempt to determine if the sized operator delete is unavailable, only that the language feature is enabled. This could cause a compile error when using `std::allocator`, but the same compile error would occur whenever the user calls `new`, so I don't think it's a problem.

Reviewers: ldionne, mclow.lists

Reviewed By: ldionne

Subscribers: rsmith, ckennelly, libcxx-commits, christof

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

llvm-svn: 345214
2018-10-24 22:44:01 +00:00
..
libcxx Implement sized deallocation for std::allocator and friends. 2018-10-24 22:44:01 +00:00
std Adjust unsupported C++ versions in some tests 2018-10-24 15:09:08 +00:00
support Fix use of libc++ specific macro in support/test_macros.h 2018-10-24 18:37:42 +00:00
CMakeLists.txt Add libc++fs to the test deps, and not to the target 'cxx'. 2018-07-27 03:47:46 +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 Allow passing additional compiler/linker flags for the tests 2018-02-23 15:19:48 +00:00
nothing_to_do.pass.cpp