diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-10-26 19:26:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-10-26 19:26:45 +0000 |
commit | 6822bd79ac43f267613f1615bf60407103e24dba (patch) | |
tree | 3f29df66730f2992292de2bfd5e2913696043b6f /clang/docs | |
parent | 9e22b4c76d7214002e446d28b5fa31102b529e99 (diff) |
PR26547: alignof should return ABI alignment, not preferred alignment
Summary:
- Add `UETT_PreferredAlignOf` to account for the difference between `__alignof` and `alignof`
- `AlignOfType` now returns ABI alignment instead of preferred alignment iff clang-abi-compat > 7, and one uses _Alignof or alignof
Patch by Nicole Mazzuca!
Differential Revision: https://reviews.llvm.org/D53207
llvm-svn: 345419
Diffstat (limited to 'clang/docs')
-rw-r--r-- | clang/docs/ReleaseNotes.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 7e798492bb0f..c6ddbfd8eaf2 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -77,6 +77,11 @@ future versions of Clang. Modified Compiler Flags ----------------------- +- As of clang 8, `alignof` and `_Alignof` return the ABI alignment of a type, + as opposed to the preferred alignment. `__alignof` still returns the + preferred alignment. `-fclang-abi-compat=7` (and previous) will make + `alignof` and `_Alignof` return preferred alignment again. + New Pragmas in Clang -------------------- @@ -132,6 +137,21 @@ OpenCL C Language Changes in Clang ... +ABI Changes in Clang +-------------------- + +- `_Alignof` and `alignof` now return the ABI alignment of a type, as opposed + to the preferred alignment. + - This is more in keeping with the language of the standards, as well as + being compatible with gcc + - `__alignof` and `__alignof__` still return the preferred alignment of + a type + - This shouldn't break any ABI except for things that explicitly ask for + `alignas(alignof(T))`. + - If you have interfaces that break with this change, you may wish to switch + to `alignas(__alignof(T))`, instead of using the `-fclang-abi-compat` + switch. + OpenMP Support in Clang ---------------------------------- |