diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-05-16 21:31:35 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-05-16 21:31:35 +0000 |
commit | d13f57a1a1a1cc23c97bf5b99b89f28f8b8c1149 (patch) | |
tree | 8b052c6651d6ac5b6df85ad98e3efcbae82b47d7 | |
parent | Update Release Notes (diff) | |
download | llvm-project-d13f57a1a1a1cc23c97bf5b99b89f28f8b8c1149.tar.gz llvm-project-d13f57a1a1a1cc23c97bf5b99b89f28f8b8c1149.tar.bz2 llvm-project-d13f57a1a1a1cc23c97bf5b99b89f28f8b8c1149.zip |
Merging r201843llvmorg-3.4.2-rc1llvmorg-3.4.2release/3.4.x
------------------------------------------------------------------------
r201843 | chandlerc | 2014-02-21 00:37:30 -0800 (Fri, 21 Feb 2014) | 4 lines
Teach libc++ to use the compiler-provided C-compatible ::max_align_t
rather than its own type for std::max_align_t. This is particularly
relevant as the types may not be ABI compatible despite users expecting
them to be.
------------------------------------------------------------------------
llvm-svn: 209032
-rw-r--r-- | libcxx/include/cstddef | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcxx/include/cstddef b/libcxx/include/cstddef index 7ef16ff2a367..0030ec289a8c 100644 --- a/libcxx/include/cstddef +++ b/libcxx/include/cstddef @@ -52,7 +52,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD using ::ptrdiff_t; using ::size_t; +#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) +// Re-use the compiler's <stddef.h> max_align_t where possible. +using ::max_align_t; +#else typedef long double max_align_t; +#endif #ifdef _LIBCPP_HAS_NO_NULLPTR |