Revert "QTypeInfo: add detection for Clang's __is_trivially_relocatable"

This reverts commit f4bac3ca173be9f219099c04e76d6d62c4d0e19e.

It broke builds with Xcode 15

Change-Id: Iee232658ede3dfb09d65f3f6a95410c069941421
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2024-03-22 11:14:25 +00:00
parent d2dbe2d7f7
commit da51b957c0
2 changed files with 1 additions and 21 deletions

View File

@ -23,13 +23,7 @@ class QDebug;
namespace QtPrivate {
template <typename T>
inline constexpr bool qIsRelocatable = (std::is_trivially_copyable_v<T> && std::is_trivially_destructible_v<T>)
#if defined(__has_builtin)
#if __has_builtin(__is_trivially_relocatable)
|| __is_trivially_relocatable(T)
#endif
#endif
;
inline constexpr bool qIsRelocatable = std::is_trivially_copyable_v<T> && std::is_trivially_destructible_v<T>;
// Denotes types that are trivially default constructible, and for which
// value-initialization can be achieved by filling their storage with 0 bits.

View File

@ -930,20 +930,6 @@ struct Trivial1
static_assert(!QTypeInfo<Trivial1>::isComplex);
static_assert(QTypeInfo<Trivial1>::isRelocatable);
#if defined(__has_builtin)
#if __has_builtin(__is_trivially_relocatable) && __has_attribute(trivial_abi)
struct [[clang::trivial_abi]] TrivialAbi1
{
~TrivialAbi1();
TrivialAbi1(TrivialAbi1 &&);
};
static_assert(__has_builtin(__is_trivially_relocatable));
static_assert(__is_trivially_relocatable(TrivialAbi1));
static_assert(QTypeInfo<TrivialAbi1>::isComplex);
static_assert(QTypeInfo<TrivialAbi1>::isRelocatable);
#endif
#endif
QT_END_NAMESPACE
QTEST_APPLESS_MAIN(tst_QGlobal)