[libcxx-commits] [PATCH] D133661: [libc++] Improve binary size when using __transaction

Alexander Kornienko via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 31 17:11:14 PST 2023


alexfh added a comment.

In D133661#4095119 <https://reviews.llvm.org/D133661#4095119>, @rupprecht wrote:

> The ABI tag approach fixes the ODR issue I was looking at
>
>   @@ -60,7 +60,7 @@
>   
>    #ifndef _LIBCPP_NO_EXCEPTIONS
>    template <class _Rollback>
>   -struct __exception_guard {
>   +struct __attribute__((__abi_tag__(("fexceptions")))) __exception_guard {
>      __exception_guard() = delete;
>   
>      _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __exception_guard(_Rollback __rollback)
>   @@ -89,7 +89,7 @@
>    };
>    #else  // _LIBCPP_NO_EXCEPTIONS
>    template <class _Rollback>
>   -struct __exception_guard {
>   +struct __attribute__((__abi_tag__(("fnoexceptions")))) __exception_guard  {
>      __exception_guard() = delete;
>      _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG explicit __exception_guard(_Rollback) {}

Same patch fixes a large fraction of other issues we've been looking at.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133661/new/

https://reviews.llvm.org/D133661



More information about the libcxx-commits mailing list