mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
Disable CFI checks in std::addressof.
std::addressof may be used on a storage of an object before the start of its lifetime (see std::allocate_shared for example). CFI flags the C-style cast as invalid in that case. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@263310 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -399,7 +399,7 @@ template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp
|
|||||||
// addressof
|
// addressof
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY
|
||||||
_Tp*
|
_Tp*
|
||||||
addressof(_Tp& __x) _NOEXCEPT
|
addressof(_Tp& __x) _NOEXCEPT
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user