File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -501,11 +501,19 @@ using swap_internal::StdSwapIsUnconstrained;
501501//
502502// TODO(b/275003464): remove the opt-out once the bug is fixed.
503503//
504+ // Starting with Xcode 15, the Apple compiler will falsely say a type
505+ // with a user-provided move constructor is trivially relocatable
506+ // (b/324278148). We will opt out without a version check, due to
507+ // the fluidity of Apple versions.
508+ //
509+ // TODO(b/324278148): If all versions we use have the bug fixed, then
510+ // remove the condition.
511+ //
504512// According to https://github.com/abseil/abseil-cpp/issues/1479, this does not
505513// work with NVCC either.
506514#if ABSL_HAVE_BUILTIN(__is_trivially_relocatable) && \
507515 !(defined (__clang__) && (defined (_WIN32) || defined (_WIN64))) && \
508- !defined (__NVCC__)
516+ !( defined (__APPLE__)) && ! defined (__NVCC__)
509517template <class T >
510518struct is_trivially_relocatable
511519 : std::integral_constant<bool , __is_trivially_relocatable(T)> {};
Original file line number Diff line number Diff line change @@ -792,9 +792,12 @@ TEST(TriviallyRelocatable, UserProvidedDestructor) {
792792
793793// TODO(b/275003464): remove the opt-out for Clang on Windows once
794794// __is_trivially_relocatable is used there again.
795- #if defined(ABSL_HAVE_ATTRIBUTE_TRIVIAL_ABI) && \
796- ABSL_HAVE_BUILTIN (__is_trivially_relocatable) && \
797- !(defined (__clang__) && (defined (_WIN32) || defined(_WIN64)))
795+ // TODO(b/324278148): remove the opt-out for Apple once
796+ // __is_trivially_relocatable is fixed there.
797+ #if defined(ABSL_HAVE_ATTRIBUTE_TRIVIAL_ABI) && \
798+ ABSL_HAVE_BUILTIN (__is_trivially_relocatable) && \
799+ !(defined (__clang__) && (defined (_WIN32) || defined(_WIN64))) && \
800+ !defined(__APPLE__)
798801// A type marked with the "trivial ABI" attribute is trivially relocatable even
799802// if it has user-provided move/copy constructors and a user-provided
800803// destructor.
You can’t perform that action at this time.
0 commit comments