Skip to content

Commit

Permalink
[libc++] Remove obsolete _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF (llvm#…
Browse files Browse the repository at this point in the history
…112745)

I don't know if that macro was ever truly defined by Clang, however it's
not anymore, so that is effectively dead code.
  • Loading branch information
ldionne authored Oct 18, 2024
1 parent fdd7c03 commit 3a30955
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libcxx/include/__memory/addressof.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_NO_CFI _LIBCPP_HIDE_FROM_ABI _Tp* a
return __builtin_addressof(__x);
}

#if _LIBCPP_HAS_OBJC_ARC && !defined(_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF)
#if _LIBCPP_HAS_OBJC_ARC
// Objective-C++ Automatic Reference Counting uses qualified pointers
// that require special addressof() signatures. When
// _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler
// itself is providing these definitions. Otherwise, we provide them.
// that require special addressof() signatures.
template <class _Tp>
inline _LIBCPP_HIDE_FROM_ABI __strong _Tp* addressof(__strong _Tp& __x) _NOEXCEPT {
return &__x;
Expand Down

0 comments on commit 3a30955

Please sign in to comment.