[PATCH] D54814: Move internal usages of `alignof`/`__alignof` to use `_LIBCPP_ALIGNOF`.

James Y Knight via Phabricator reviews at reviews.llvm.org
Thu Dec 6 15:01:59 PST 2018


jyknight added a comment.

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.


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