This is an archive of the discontinued LLVM Phabricator instance.

The maximum alignment of std::aligned_storage applies to all Windows compilers
ClosedPublic

Authored by rnk on Nov 2 2015, 1:21 PM.

Details

Summary

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.

Diff Detail

Event Timeline

rnk updated this revision to Diff 38975.Nov 2 2015, 1:21 PM
rnk retitled this revision from to The maximum alignment of std::aligned_storage applies to all Windows compilers.
rnk updated this object.
rnk added reviewers: danalbert, mclow.lists.
rnk added a subscriber: cfe-commits.
compnerd accepted this revision.Nov 2 2015, 9:46 PM
compnerd added a reviewer: compnerd.
compnerd added a subscriber: compnerd.

Yeah, this is a COFF limitation. Its unfortunate we don't have a better way to detect COFF targets.

This revision is now accepted and ready to land.Nov 2 2015, 9:46 PM

Looks like patch was not committed.

mclow.lists accepted this revision.Sep 26 2016, 9:56 PM
mclow.lists edited edge metadata.

I guess this is OK. I'd rather not have naked _WIN32 references outside of <__config>, but this is not the first one.

mclow.lists closed this revision.Oct 7 2016, 4:28 PM

This duplicates @D25053, and I've landed this change as revision 283621.