Revert "Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`. "
This reverts commit 087f065cb0c7463f521a62599884493aaee2ea12.
The tests were failing on 32 bit builds, and I don't have time
to clean them up right now. I'll recommit tomorrow with fixed tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347816 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/valarray b/include/valarray
index 07f38c8..3188b6a 100644
--- a/include/valarray
+++ b/include/valarray
@@ -2740,7 +2740,7 @@
__r.__begin_ =
__r.__end_ =
static_cast<result_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(result_type), _LIBCPP_ALIGNOF(result_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(result_type), __alignof(result_type)));
for (size_t __i = 0; __i != __n; ++__r.__end_, ++__i)
::new (__r.__end_) result_type(__expr_[__i]);
}
@@ -2758,7 +2758,7 @@
if (__n)
{
__begin_ = __end_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -2793,7 +2793,7 @@
if (__n)
{
__begin_ = __end_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -2819,7 +2819,7 @@
if (__v.size())
{
__begin_ = __end_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__v.size() * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__v.size() * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -2857,7 +2857,7 @@
if (__n)
{
__begin_ = __end_ = static_cast<value_type*>(
-_VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+_VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -2887,7 +2887,7 @@
if (__n)
{
__begin_ = __end_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -2915,7 +2915,7 @@
if (__n)
{
__begin_ = __end_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -2945,7 +2945,7 @@
if (__n)
{
__begin_ = __end_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -2975,7 +2975,7 @@
if (__n)
{
__begin_ = __end_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -3012,7 +3012,7 @@
{
__clear(size());
__begin_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
__end_ = __begin_ + __n;
_VSTD::uninitialized_copy(__f, __l, __begin_);
} else {
@@ -3268,7 +3268,7 @@
__r.__begin_ =
__r.__end_ =
static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
::new (__r.__end_) value_type(+*__p);
}
@@ -3286,7 +3286,7 @@
__r.__begin_ =
__r.__end_ =
static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
::new (__r.__end_) value_type(-*__p);
}
@@ -3304,7 +3304,7 @@
__r.__begin_ =
__r.__end_ =
static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
::new (__r.__end_) value_type(~*__p);
}
@@ -3321,7 +3321,7 @@
{
__r.__begin_ =
__r.__end_ =
- static_cast<bool*>(_VSTD::__libcpp_allocate(__n * sizeof(bool), _LIBCPP_ALIGNOF(bool)));
+ static_cast<bool*>(_VSTD::__libcpp_allocate(__n * sizeof(bool), __alignof(bool)));
for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
::new (__r.__end_) bool(!*__p);
}
@@ -3642,7 +3642,7 @@
__r.__begin_ =
__r.__end_ =
static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
const value_type* __sb;
value_type* __tb;
value_type* __te;
@@ -3681,7 +3681,7 @@
__r.__begin_ =
__r.__end_ =
static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
__i %= static_cast<int>(__n);
const value_type* __m = __i >= 0 ? __begin_ + __i : __end_ + __i;
for (const value_type* __s = __m; __s != __end_; ++__r.__end_, ++__s)
@@ -3703,7 +3703,7 @@
__r.__begin_ =
__r.__end_ =
static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
::new (__r.__end_) value_type(__f(*__p));
}
@@ -3721,7 +3721,7 @@
__r.__begin_ =
__r.__end_ =
static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
for (const value_type* __p = __begin_; __n; ++__r.__end_, ++__p, --__n)
::new (__r.__end_) value_type(__f(*__p));
}
@@ -3736,7 +3736,7 @@
{
while (__end_ != __begin_)
(--__end_)->~value_type();
- _VSTD::__libcpp_deallocate(__begin_, __capacity * sizeof(value_type), _LIBCPP_ALIGNOF(value_type));
+ _VSTD::__libcpp_deallocate(__begin_, __capacity * sizeof(value_type), __alignof(value_type));
__begin_ = __end_ = nullptr;
}
}
@@ -3749,7 +3749,7 @@
if (__n)
{
__begin_ = __end_ = static_cast<value_type*>(
- _VSTD::__libcpp_allocate(__n * sizeof(value_type), _LIBCPP_ALIGNOF(value_type)));
+ _VSTD::__libcpp_allocate(__n * sizeof(value_type), __alignof(value_type)));
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{