[libcxx-commits] [libcxx] [libc++] Remove obsolete _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF (PR #112745)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 17 09:33:31 PDT 2024
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/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.
>From c592076242b870f2226ab6bc1285eeb9a8641e74 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Thu, 17 Oct 2024 12:32:13 -0400
Subject: [PATCH] [libc++] Remove obsolete
_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF
I don't know if that macro was ever truly defined by Clang, however
it's not anymore, so that is effectively dead code.
---
libcxx/include/__memory/addressof.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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