[libcxx] r209032 - Merging r201843
Tom Stellard
thomas.stellard at amd.com
Fri May 16 14:31:36 PDT 2014
Author: tstellar
Date: Fri May 16 16:31:35 2014
New Revision: 209032
URL: http://llvm.org/viewvc/llvm-project?rev=209032&view=rev
Log:
Merging r201843
------------------------------------------------------------------------
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.
------------------------------------------------------------------------
Modified:
libcxx/branches/release_34/ (props changed)
libcxx/branches/release_34/include/cstddef
Propchange: libcxx/branches/release_34/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 16 16:31:35 2014
@@ -1,2 +1,2 @@
/libcxx/branches/apple:136569-137939
-/libcxx/trunk:195136,195143,195693,196058,197061,197314
+/libcxx/trunk:195136,195143,195693,196058,197061,197314,201843
Modified: libcxx/branches/release_34/include/cstddef
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/release_34/include/cstddef?rev=209032&r1=209031&r2=209032&view=diff
==============================================================================
--- libcxx/branches/release_34/include/cstddef (original)
+++ libcxx/branches/release_34/include/cstddef Fri May 16 16:31:35 2014
@@ -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
More information about the cfe-commits
mailing list