[llvm] b3e9b07 - Avoid testing for libc++ internal macros after D99834
Dimitry Andric via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 7 09:53:12 PDT 2021
Author: Dimitry Andric
Date: 2021-04-07T18:52:41+02:00
New Revision: b3e9b07a7d1cb543dcd8652a49a3613e6c9d993a
URL: https://github.com/llvm/llvm-project/commit/b3e9b07a7d1cb543dcd8652a49a3613e6c9d993a
DIFF: https://github.com/llvm/llvm-project/commit/b3e9b07a7d1cb543dcd8652a49a3613e6c9d993a.diff
LOG: Avoid testing for libc++ internal macros after D99834
As D99834 was meant specifically for FreeBSD, which still uses the older
non-trivial std::pair copy constructors, test for `__FreeBSD__` instead
of relying on a macro which is an internal detail of libc++.
Noted by Louis Dionne.
Added:
Modified:
llvm/unittests/Support/TypeTraitsTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Support/TypeTraitsTest.cpp b/llvm/unittests/Support/TypeTraitsTest.cpp
index cd78f0900b87..bd2134370019 100644
--- a/llvm/unittests/Support/TypeTraitsTest.cpp
+++ b/llvm/unittests/Support/TypeTraitsTest.cpp
@@ -110,7 +110,7 @@ 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)
+#if !defined(__FreeBSD__)
TrivialityTester<std::pair<int, bool>, true, true>();
#endif
TrivialityTester<llvm::unique_function<int()>, false, false>();
More information about the llvm-commits
mailing list