[PATCH] D54814: Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`.
Louis Dionne via Phabricator
reviews at reviews.llvm.org
Mon Dec 10 11:35:55 PST 2018
ldionne added a comment.
In D54814#1322110 <https://reviews.llvm.org/D54814#1322110>, @jyknight wrote:
> I'd note that most of this diff was not actually required to fix the issue. E.g, in the locations where an alignment is passed to allocation/deallocation functions directly, it is perfectly fine to use the __alignof value instead of the alignof value.
>
> We could also ameliorate some ABI breakage by continuing to use __alignof within libc++, where changing to alignof would break the ABI of a standard library type. E.g., we could switch the use of std::alignment_of in __any_imp to instead call __alignof, preserving behavior.
>
> That appears to be the strategy GCC went with -- making the minimal ABI change necessary to be compliant.
I think it's better to fix it everywhere. If they want to truly be safe, people who actually care about ABI (and not breaking their customer's ABIs) will have to use `-fclang-abi-compat=7`.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54814/new/
https://reviews.llvm.org/D54814
More information about the libcxx-commits
mailing list