This revision was automatically updated to reflect the committed changes. Closed by commit rCXX339797: libcxx: Mark __temp_value::__temp_value as _LIBCPP_NO_CFI. (authored by pcc, committed by ). Herald added subscribers: cfe-commits, ldionne.
Changed prior to commit: https://reviews.llvm.org/D50743?vs=160712&id=160852#toc Repository: rCXX libc++ https://reviews.llvm.org/D50743 Files: include/memory Index: include/memory =================================================================== --- include/memory +++ include/memory @@ -5631,8 +5631,11 @@ _Tp & get() { return *__addr(); } template<class... _Args> - __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) - { _Traits::construct(__a, __addr(), _VSTD::forward<_Args>(__args)...); } + _LIBCPP_NO_CFI + __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) { + _Traits::construct(__a, reinterpret_cast<_Tp*>(addressof(__v)), + _VSTD::forward<_Args>(__args)...); + } ~__temp_value() { _Traits::destroy(__a, __addr()); } };
Index: include/memory =================================================================== --- include/memory +++ include/memory @@ -5631,8 +5631,11 @@ _Tp & get() { return *__addr(); } template<class... _Args> - __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) - { _Traits::construct(__a, __addr(), _VSTD::forward<_Args>(__args)...); } + _LIBCPP_NO_CFI + __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) { + _Traits::construct(__a, reinterpret_cast<_Tp*>(addressof(__v)), + _VSTD::forward<_Args>(__args)...); + } ~__temp_value() { _Traits::destroy(__a, __addr()); } };
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits