summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/meta
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-11-28 22:24:19 +0000
committerEric Fiselier <eric@efcs.ca>2018-11-28 22:24:19 +0000
commit9d25ada420feea3a3ffafbb3eeee3679da774042 (patch)
tree1e974d035dbb990bd33bdd9759338b85adc5af4a /libcxx/test/std/utilities/meta
parentbc5679eaff576da9475808bc04935b9c25cd32b4 (diff)
downloadbcm5719-llvm-9d25ada420feea3a3ffafbb3eeee3679da774042.tar.gz
bcm5719-llvm-9d25ada420feea3a3ffafbb3eeee3679da774042.zip
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. llvm-svn: 347816
Diffstat (limited to 'libcxx/test/std/utilities/meta')
-rw-r--r--libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
index 012741ff6c7..d7e35a62f8f 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
@@ -254,6 +254,9 @@ int main()
// Use alignof(std::max_align_t) below to find the max alignment instead of
// hardcoding it, because it's different on different platforms.
// (For example 8 on arm and 16 on x86.)
+#if TEST_STD_VER < 11
+#define alignof __alignof__
+#endif
{
typedef std::aligned_storage<16>::type T1;
#if TEST_STD_VER > 11
@@ -261,7 +264,7 @@ int main()
#endif
static_assert(std::is_trivial<T1>::value, "");
static_assert(std::is_standard_layout<T1>::value, "");
- static_assert(std::alignment_of<T1>::value == TEST_ALIGNOF(std::max_align_t),
+ static_assert(std::alignment_of<T1>::value == alignof(std::max_align_t),
"");
static_assert(sizeof(T1) == 16, "");
}
@@ -272,9 +275,9 @@ int main()
#endif
static_assert(std::is_trivial<T1>::value, "");
static_assert(std::is_standard_layout<T1>::value, "");
- static_assert(std::alignment_of<T1>::value == TEST_ALIGNOF(std::max_align_t),
+ static_assert(std::alignment_of<T1>::value == alignof(std::max_align_t),
"");
- static_assert(sizeof(T1) == 16 + TEST_ALIGNOF(std::max_align_t), "");
+ static_assert(sizeof(T1) == 16 + alignof(std::max_align_t), "");
}
{
typedef std::aligned_storage<10>::type T1;
OpenPOWER on IntegriCloud