You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Eric Fiselier
272871b658
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: ldionne, EricWF
Subscribers: jyknight, christof, libcxx-commits
Differential Revision: https://reviews.llvm.org/D54814
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@351289 91177308-0d34-0410-b5e6-96231b3b80d8
6 years ago
..
__config
Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to."
7 years ago
__memory
Add <experimental/memory_resource>
9 years ago
algorithm
Remove std::experimental::sample; use std::sample instead. See https://libcxx.llvm.org/TS_deprecation.html
7 years ago
any
Fix PR39749 - Headers containing just #error harm __has_include.
6 years ago
chrono
Fix PR39749 - Headers containing just #error harm __has_include.
6 years ago
coroutine
Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`.
6 years ago
deque
Add experimental container alias templates for PMRs
9 years ago
filesystem
Implement <filesystem>
7 years ago
forward_list
Add experimental container alias templates for PMRs
9 years ago
functional
While implementing P0777 - preventing unnecessary decay, I found some non-public uses of decay that could be replaced by __uncvref. NFC intented
7 years ago
iterator
Rename identifiers named `__output`
7 years ago
list
Add experimental container alias templates for PMRs
9 years ago
map
Add experimental container alias templates for PMRs
9 years ago
memory_resource
Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`.
6 years ago
numeric
Fix PR39749 - Headers containing just #error harm __has_include.
6 years ago
optional
Fix PR39749 - Headers containing just #error harm __has_include.
6 years ago
propagate_const
Implement LWG#2518 - Non-member swap for propagate_const should call member swap
7 years ago
ratio
Fix PR39749 - Headers containing just #error harm __has_include.
6 years ago
regex
Add experimental container alias templates for PMRs
9 years ago
set
Add experimental container alias templates for PMRs
9 years ago
simd
Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to."
7 years ago
string
Add experimental container alias templates for PMRs
9 years ago
string_view
Fix PR39749 - Headers containing just #error harm __has_include.
6 years ago
system_error
Fix PR39749 - Headers containing just #error harm __has_include.
6 years ago
tuple
Fix PR39749 - Headers containing just #error harm __has_include.
6 years ago
type_traits
Remove more of the std::experimental bits that are now in std::. All the _v type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html
7 years ago
unordered_map
Add experimental container alias templates for PMRs
9 years ago
unordered_set
Add experimental container alias templates for PMRs
9 years ago
utility
[NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS
8 years ago
vector
Add experimental container alias templates for PMRs
9 years ago