[llvm] 6fbbb09 - Don't check that std::pair is trivially copyable on FreeBSD
Dimitry Andric via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 4 04:14:21 PDT 2021
Author: Dimitry Andric
Date: 2021-04-04T13:13:56+02:00
New Revision: 6fbbb093aea52928bb8df4a2212f44ac3bac7733
URL: https://github.com/llvm/llvm-project/commit/6fbbb093aea52928bb8df4a2212f44ac3bac7733
DIFF: https://github.com/llvm/llvm-project/commit/6fbbb093aea52928bb8df4a2212f44ac3bac7733.diff
LOG: Don't check that std::pair is trivially copyable on FreeBSD
As FreeBSD already used libc++ before it changed its ABI, we still use
the non-trivially copyable version of std::pair, which used to be
exposed via `_LIBCPP_TRIVIAL_PAIR_COPY_CTOR`, but more recently via
`_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR`.
Reviewed By: serge-sans-paille
Differential Revision: https://reviews.llvm.org/D99834
Added:
Modified:
llvm/unittests/Support/TypeTraitsTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Support/TypeTraitsTest.cpp b/llvm/unittests/Support/TypeTraitsTest.cpp
index 15a38b8fb65bb..cd78f0900b877 100644
--- a/llvm/unittests/Support/TypeTraitsTest.cpp
+++ b/llvm/unittests/Support/TypeTraitsTest.cpp
@@ -110,7 +110,9 @@ TEST(Triviality, ADT) {
TrivialityTester<llvm::SmallString<8>, false, false>();
TrivialityTester<std::function<int()>, false, false>();
+#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
TrivialityTester<std::pair<int, bool>, true, true>();
+#endif
TrivialityTester<llvm::unique_function<int()>, false, false>();
TrivialityTester<llvm::StringRef, true, true>();
TrivialityTester<llvm::ArrayRef<int>, true, true>();
More information about the llvm-commits
mailing list