Author: ericwf Date: Wed Oct 12 05:19:48 2016 New Revision: 283999 URL: http://llvm.org/viewvc/llvm-project?rev=283999&view=rev Log: Remove usages of _ALIGNAS_TYPE
Modified: libcxx/trunk/test/std/atomics/atomics.flag/default.pass.cpp libcxx/trunk/test/std/atomics/atomics.types.generic/address.pass.cpp libcxx/trunk/test/std/atomics/atomics.types.generic/bool.pass.cpp libcxx/trunk/test/std/atomics/atomics.types.generic/integral.pass.cpp libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp libcxx/trunk/test/support/test_macros.h Modified: libcxx/trunk/test/std/atomics/atomics.flag/default.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/atomics.flag/default.pass.cpp?rev=283999&r1=283998&r2=283999&view=diff ============================================================================== --- libcxx/trunk/test/std/atomics/atomics.flag/default.pass.cpp (original) +++ libcxx/trunk/test/std/atomics/atomics.flag/default.pass.cpp Wed Oct 12 05:19:48 2016 @@ -19,6 +19,8 @@ #include <new> #include <cassert> +#include "test_macros.h" + int main() { std::atomic_flag f; @@ -26,7 +28,7 @@ int main() assert(f.test_and_set() == 0); { typedef std::atomic_flag A; - _ALIGNAS_TYPE(A) char storage[sizeof(A)] = {1}; + TEST_ALIGNAS_TYPE(A) char storage[sizeof(A)] = {1}; A& zero = *new (storage) A(); assert(!zero.test_and_set()); zero.~A(); Modified: libcxx/trunk/test/std/atomics/atomics.types.generic/address.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/atomics.types.generic/address.pass.cpp?rev=283999&r1=283998&r2=283999&view=diff ============================================================================== --- libcxx/trunk/test/std/atomics/atomics.types.generic/address.pass.cpp (original) +++ libcxx/trunk/test/std/atomics/atomics.types.generic/address.pass.cpp Wed Oct 12 05:19:48 2016 @@ -75,6 +75,8 @@ #include <cmpxchg_loop.h> +#include "test_macros.h" + template <class A, class T> void do_test() @@ -121,7 +123,7 @@ do_test() assert(obj == T(2*sizeof(X))); { - _ALIGNAS_TYPE(A) char storage[sizeof(A)] = {23}; + TEST_ALIGNAS_TYPE(A) char storage[sizeof(A)] = {23}; A& zero = *new (storage) A(); assert(zero == T(0)); zero.~A(); Modified: libcxx/trunk/test/std/atomics/atomics.types.generic/bool.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/atomics.types.generic/bool.pass.cpp?rev=283999&r1=283998&r2=283999&view=diff ============================================================================== --- libcxx/trunk/test/std/atomics/atomics.types.generic/bool.pass.cpp (original) +++ libcxx/trunk/test/std/atomics/atomics.types.generic/bool.pass.cpp Wed Oct 12 05:19:48 2016 @@ -57,6 +57,8 @@ #include <cmpxchg_loop.h> +#include "test_macros.h" + int main() { { @@ -226,7 +228,7 @@ int main() } { typedef std::atomic<bool> A; - _ALIGNAS_TYPE(A) char storage[sizeof(A)] = {1}; + TEST_ALIGNAS_TYPE(A) char storage[sizeof(A)] = {1}; A& zero = *new (storage) A(); assert(zero == false); zero.~A(); Modified: libcxx/trunk/test/std/atomics/atomics.types.generic/integral.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/atomics.types.generic/integral.pass.cpp?rev=283999&r1=283998&r2=283999&view=diff ============================================================================== --- libcxx/trunk/test/std/atomics/atomics.types.generic/integral.pass.cpp (original) +++ libcxx/trunk/test/std/atomics/atomics.types.generic/integral.pass.cpp Wed Oct 12 05:19:48 2016 @@ -92,6 +92,8 @@ #include <cmpxchg_loop.h> +#include "test_macros.h" + template <class A, class T> void do_test() @@ -151,7 +153,7 @@ do_test() assert(obj == T(8)); { - _ALIGNAS_TYPE(A) char storage[sizeof(A)] = {23}; + TEST_ALIGNAS_TYPE(A) char storage[sizeof(A)] = {23}; A& zero = *new (storage) A(); assert(zero == 0); zero.~A(); Modified: libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp?rev=283999&r1=283998&r2=283999&view=diff ============================================================================== --- libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp (original) +++ libcxx/trunk/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp Wed Oct 12 05:19:48 2016 @@ -18,12 +18,14 @@ #include <cstdlib> #include <cassert> +#include "test_macros.h" + class A { int data_; public: explicit A(int data) : data_(data) {} - virtual ~A() _NOEXCEPT {} + virtual ~A() TEST_NOEXCEPT {} friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;} }; Modified: libcxx/trunk/test/support/test_macros.h URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/test_macros.h?rev=283999&r1=283998&r2=283999&view=diff ============================================================================== --- libcxx/trunk/test/support/test_macros.h (original) +++ libcxx/trunk/test/support/test_macros.h Wed Oct 12 05:19:48 2016 @@ -94,13 +94,19 @@ # else # define TEST_CONSTEXPR_CXX14 # endif +#define TEST_ALIGNOF(...) alignof(__VA_ARGS__) +#define TEST_ALIGNAS(...) alignas(__VA_ARGS__) #else #define TEST_CONSTEXPR #define TEST_CONSTEXPR_CXX14 #define TEST_NOEXCEPT #define TEST_NOEXCEPT_COND(...) +#define TEST_ALIGNOF(...) __alignof(__VA_ARGS__) +#define TEST_ALIGNAS(...) __attribute__((__aligned__(__VA_ARGS__))) #endif +#define TEST_ALIGNAS_TYPE(...) TEST_ALIGNAS(TEST_ALIGNOF(__VA_ARGS__)) + #if !TEST_HAS_FEATURE(cxx_rtti) && !defined(__cpp_rtti) \ && !defined(__GXX_RTTI) #define TEST_HAS_NO_RTTI _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits