Date: Wed, 19 Jul 2017 18:22:32 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321222 - in stable/10: contrib/libc++/include contrib/libc++/src sys/sys Message-ID: <201707191822.v6JIMWZn070264@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Wed Jul 19 18:22:32 2017 New Revision: 321222 URL: https://svnweb.freebsd.org/changeset/base/321222 Log: Pull in r229281 from upstream libc++ (by Larisse Voufo): Implement C++14's sized deallocation functions, since there are no longer implicitly defined by clang, as of r229241. This allows ports which use C++14's sized deallocation functions, such as cad/openvsp, to build on stable/10. Bump __FreeBSD_version to allow detection from ports. Direct commit, since stable/11 and head already have newer versions of libc++ which include this change. PR: 219484 Modified: stable/10/contrib/libc++/include/new stable/10/contrib/libc++/src/new.cpp stable/10/sys/sys/param.h Modified: stable/10/contrib/libc++/include/new ============================================================================== --- stable/10/contrib/libc++/include/new Wed Jul 19 18:19:51 2017 (r321221) +++ stable/10/contrib/libc++/include/new Wed Jul 19 18:22:32 2017 (r321222) @@ -50,12 +50,18 @@ new_handler get_new_handler() noexcept; void* operator new(std::size_t size); // replaceable void* operator new(std::size_t size, const std::nothrow_t&) noexcept; // replaceable void operator delete(void* ptr) noexcept; // replaceable +void operator delete(void* ptr, std::size_t size) noexcept; // replaceable, C++14 void operator delete(void* ptr, const std::nothrow_t&) noexcept; // replaceable +void operator delete(void* ptr, std::size_t size, + const std::nothrow_t&) noexcept; // replaceable, C++14 void* operator new[](std::size_t size); // replaceable void* operator new[](std::size_t size, const std::nothrow_t&) noexcept; // replaceable void operator delete[](void* ptr) noexcept; // replaceable +void operator delete[](void* ptr, std::size_t size) noexcept; // replaceable, C++14 void operator delete[](void* ptr, const std::nothrow_t&) noexcept; // replaceable +void operator delete[](void* ptr, std::size_t size, + const std::nothrow_t&) noexcept; // replaceable, C++14 void* operator new (std::size_t size, void* ptr) noexcept; void* operator new[](std::size_t size, void* ptr) noexcept; @@ -131,7 +137,9 @@ _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t ; _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS; _LIBCPP_NEW_DELETE_VIS void operator delete(void* __p) _NOEXCEPT; +_LIBCPP_NEW_DELETE_VIS void operator delete(void* __p, std::size_t __sz) _NOEXCEPT; _LIBCPP_NEW_DELETE_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_NEW_DELETE_VIS void operator delete(void* __p, std::size_t __sz, const std::nothrow_t&) _NOEXCEPT; _LIBCPP_NEW_DELETE_VIS void* operator new[](std::size_t __sz) #if !__has_feature(cxx_noexcept) @@ -140,7 +148,9 @@ _LIBCPP_NEW_DELETE_VIS void* operator new[](std::size_ ; _LIBCPP_NEW_DELETE_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS; _LIBCPP_NEW_DELETE_VIS void operator delete[](void* __p) _NOEXCEPT; +_LIBCPP_NEW_DELETE_VIS void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT; _LIBCPP_NEW_DELETE_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_NEW_DELETE_VIS void operator delete[](void* __p, std::size_t __sz, const std::nothrow_t&) _NOEXCEPT; inline _LIBCPP_INLINE_VISIBILITY void* operator new (std::size_t, void* __p) _NOEXCEPT {return __p;} inline _LIBCPP_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _NOEXCEPT {return __p;} Modified: stable/10/contrib/libc++/src/new.cpp ============================================================================== --- stable/10/contrib/libc++/src/new.cpp Wed Jul 19 18:19:51 2017 (r321221) +++ stable/10/contrib/libc++/src/new.cpp Wed Jul 19 18:22:32 2017 (r321222) @@ -126,6 +126,13 @@ operator delete(void* ptr) _NOEXCEPT _LIBCPP_WEAK _LIBCPP_NEW_DELETE_VIS void +operator delete(void* ptr, size_t) _NOEXCEPT +{ + ::operator delete(ptr); +} + +_LIBCPP_WEAK _LIBCPP_NEW_DELETE_VIS +void operator delete(void* ptr, const std::nothrow_t&) _NOEXCEPT { ::operator delete(ptr); @@ -133,14 +140,35 @@ operator delete(void* ptr, const std::nothrow_t&) _NOE _LIBCPP_WEAK _LIBCPP_NEW_DELETE_VIS void +operator delete(void* ptr, size_t, const std::nothrow_t&) _NOEXCEPT +{ + ::operator delete(ptr); +} + +_LIBCPP_WEAK _LIBCPP_NEW_DELETE_VIS +void operator delete[] (void* ptr) _NOEXCEPT { - ::operator delete (ptr); + ::operator delete(ptr); } _LIBCPP_WEAK _LIBCPP_NEW_DELETE_VIS void +operator delete[] (void* ptr, size_t) _NOEXCEPT +{ + ::operator delete[](ptr); +} + +_LIBCPP_WEAK _LIBCPP_NEW_DELETE_VIS +void operator delete[] (void* ptr, const std::nothrow_t&) _NOEXCEPT +{ + ::operator delete[](ptr); +} + +_LIBCPP_WEAK _LIBCPP_NEW_DELETE_VIS +void +operator delete[] (void* ptr, size_t, const std::nothrow_t&) _NOEXCEPT { ::operator delete[](ptr); } Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Wed Jul 19 18:19:51 2017 (r321221) +++ stable/10/sys/sys/param.h Wed Jul 19 18:22:32 2017 (r321222) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1003514 /* Master, propagated to newvers */ +#define __FreeBSD_version 1003515 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707191822.v6JIMWZn070264>