[libcxx-commits] [libcxx] 3a30955 - [libc++] Remove obsolete _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF (#112745)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 18 05:32:51 PDT 2024


Author: Louis Dionne
Date: 2024-10-18T08:32:47-04:00
New Revision: 3a30955cb7166c23f041877ed56a60fb0aed80cd

URL: https://github.com/llvm/llvm-project/commit/3a30955cb7166c23f041877ed56a60fb0aed80cd
DIFF: https://github.com/llvm/llvm-project/commit/3a30955cb7166c23f041877ed56a60fb0aed80cd.diff

LOG: [libc++] Remove obsolete _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF (#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.

Added: 
    

Modified: 
    libcxx/include/__memory/addressof.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__memory/addressof.h b/libcxx/include/__memory/addressof.h
index ecb68e0fe61e42..98b08958a6a93e 100644
--- a/libcxx/include/__memory/addressof.h
+++ b/libcxx/include/__memory/addressof.h
@@ -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;


        


More information about the libcxx-commits mailing list