diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2014-02-19 22:35:01 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2014-02-19 22:35:01 +0000 |
| commit | 88ede395cf896c0a14299be553b6084aa6a5e50d (patch) | |
| tree | 5ae17dd49b6086fcdb603e4373d9aae709950d38 /lib/Serialization/ModuleManager.cpp | |
| parent | 41da9695b1b495c52dfa8b599ebcc0bb35c08d6e (diff) | |
| download | clang-88ede395cf896c0a14299be553b6084aa6a5e50d.tar.gz clang-88ede395cf896c0a14299be553b6084aa6a5e50d.tar.bz2 clang-88ede395cf896c0a14299be553b6084aa6a5e50d.tar.xz | |
Teach Clang to provide ::max_align_t in C11 and C++11 modes.
This definition is not chosen idly. There is an unfortunate reality with
max_align_t -- the specific nature of its definition leaks into the ABI
almost immediately. Because it is part of C11 and C++11 it becomes
essential for it to match with other systems on that ABI. There is an
effort to discourage any further use of this construct as a consequence
-- using max_align_t introduces an immediate ABI problem. We can never
update it to have larger alignment even as the microarchitecture changes
to necessitate higher alignment. =/
The particular definition here exactly matches the ABI of GCC's chosen
::max_align_t definition, for better or worse. This was written with the
help of Richard Smith who was decoding the exact ABI implications of the
selected definition in GCC. Notably, in-register arguments are impacted
by the particular definition chosen. =/
No one is under the illusion that this is a "good" or "useful"
definition of max_align_t, and we are working with the standards
committee to specify a more useful interface to address this need.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ModuleManager.cpp')
0 files changed, 0 insertions, 0 deletions
