aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-11-28 18:16:02 +0000
committerEric Fiselier <eric@efcs.ca>2018-11-28 18:16:02 +0000
commit8a486dac25c84840907cfe842ca4227eabb46094 (patch)
treef7a9f0749d6fce9df55c9f06da1ee42f073cbc0a /clang/lib/CodeGen/CodeGenModule.cpp
parent81f1b4a36184114456b85553e9f465c71e674ea4 (diff)
downloadllvm-8a486dac25c84840907cfe842ca4227eabb46094.zip
llvm-8a486dac25c84840907cfe842ca4227eabb46094.tar.gz
llvm-8a486dac25c84840907cfe842ca4227eabb46094.tar.bz2
Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`.
Summary: Starting in Clang 8.0 and GCC 8.0, `alignof` and `__alignof` return different values in same cases. Specifically `alignof` and `_Alignof` return the minimum alignment for a type, where as `__alignof` returns the preferred alignment. libc++ currently uses `__alignof` but means to use `alignof`. See llvm.org/PR39713 This patch introduces the macro `_LIBCPP_ALIGNOF` so we can control which spelling gets used. This patch does not introduce any ABI guard to provide the old behavior with newer compilers. However, if we decide that is needed, this patch makes it trivial to implement. I think we should commit this change immediately, and decide what we want to do about the ABI afterwards. Reviewers: ldionne, EricWF Reviewed By: EricWF Subscribers: christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D54814 llvm-svn: 347787
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions