[PATCH] D14259: The maximum alignment of std::aligned_storage applies to all Windows compilers

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 2 13:21:15 PST 2015


rnk created this revision.
rnk added reviewers: danalbert, mclow.lists.
rnk added a subscriber: cfe-commits.

According to Clang's sources, the maximum supported storage alignment is a
property of the COFF object file format. Fixes building libc++ <type_traits>
with Clang on Windows.

http://reviews.llvm.org/D14259

Files:
  include/type_traits

Index: include/type_traits
===================================================================
--- include/type_traits
+++ include/type_traits
@@ -1147,10 +1147,10 @@
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x800);
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1000);
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2000);
-// MSDN says that MSVC does not support alignment beyond 8192 (=0x2000)
-#if !defined(_LIBCPP_MSVC)
+// PE COFF does not support alignment beyond 8192 (=0x2000)
+#if !defined(_WIN32)
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000);
-#endif // !_LIBCPP_MSVC
+#endif // !_WIN32
 
 #undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14259.38975.patch
Type: text/x-patch
Size: 641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151102/6df4d404/attachment.bin>


More information about the cfe-commits mailing list