Skip to content

Conversation

@ldionne
Copy link
Member

@ldionne ldionne commented Oct 17, 2024

I don't know if that macro was ever truly defined by Clang, however it's not anymore, so that is effectively dead code.

I don't know if that macro was ever truly defined by Clang, however
it's not anymore, so that is effectively dead code.
@ldionne ldionne requested a review from a team as a code owner October 17, 2024 16:33
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Oct 17, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 17, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

I don't know if that macro was ever truly defined by Clang, however it's not anymore, so that is effectively dead code.


Full diff: https://github.com/llvm/llvm-project/pull/112745.diff

1 Files Affected:

  • (modified) libcxx/include/__memory/addressof.h (+2-4)
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;

@ldionne ldionne merged commit 3a30955 into llvm:main Oct 18, 2024
65 checks passed
@ldionne ldionne deleted the review/remove-PREDEFINED_OBJC_ARC_ADDRESSOF branch October 18, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants