Fix dynarray test failures after changing __libcpp_allocate/deallocate
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@328182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -135,17 +135,18 @@ private:
|
|||||||
value_type * __base_;
|
value_type * __base_;
|
||||||
_LIBCPP_ALWAYS_INLINE dynarray () noexcept : __size_(0), __base_(nullptr) {}
|
_LIBCPP_ALWAYS_INLINE dynarray () noexcept : __size_(0), __base_(nullptr) {}
|
||||||
|
|
||||||
static inline _LIBCPP_INLINE_VISIBILITY value_type* __allocate ( size_t count )
|
static inline _LIBCPP_INLINE_VISIBILITY
|
||||||
{
|
value_type* __allocate(size_t __count) {
|
||||||
if ( numeric_limits<size_t>::max() / sizeof (value_type) <= count )
|
if (numeric_limits<size_t>::max() / sizeof (value_type) <= __count)
|
||||||
__throw_bad_array_length();
|
__throw_bad_array_length();
|
||||||
|
|
||||||
return static_cast<value_type *> (_VSTD::__allocate (sizeof(value_type) * count));
|
return static_cast<value_type *>(
|
||||||
|
_VSTD::__libcpp_allocate(sizeof(value_type) * __count, __alignof(value_type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline _LIBCPP_INLINE_VISIBILITY void __deallocate_value( value_type* __ptr ) noexcept
|
static inline _LIBCPP_INLINE_VISIBILITY
|
||||||
{
|
void __deallocate_value(value_type* __ptr ) noexcept {
|
||||||
_VSTD::__libcpp_deallocate (static_cast<void *> (__ptr));
|
_VSTD::__libcpp_deallocate(static_cast<void *>(__ptr), __alignof(value_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user