Use __builtin_operator_new/__builtin_operator_delete when available. This
allows allocations and deallocations to be optimized out. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@210211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -147,12 +147,12 @@ private:
|
||||
assert(!"dynarray::allocation");
|
||||
#endif
|
||||
}
|
||||
return static_cast<value_type *> (::operator new (sizeof(value_type) * count));
|
||||
return static_cast<value_type *> (_VSTD::__allocate (sizeof(value_type) * count));
|
||||
}
|
||||
|
||||
static inline _LIBCPP_INLINE_VISIBILITY void __deallocate ( value_type* __ptr ) noexcept
|
||||
{
|
||||
::operator delete (static_cast<void *> (__ptr));
|
||||
_VSTD::__deallocate (static_cast<void *> (__ptr));
|
||||
}
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user