[PATCH] D99834: Don't check that std::pair is trivially copyable on FreeBSD
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 3 03:24:49 PDT 2021
dim created this revision.
dim added reviewers: emaste, EricWF, ldionne, serge-sans-paille.
Herald added subscribers: krytarowski, arichardson.
dim requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99834
Files:
llvm/unittests/Support/TypeTraitsTest.cpp
Index: llvm/unittests/Support/TypeTraitsTest.cpp
===================================================================
--- llvm/unittests/Support/TypeTraitsTest.cpp
+++ llvm/unittests/Support/TypeTraitsTest.cpp
@@ -110,7 +110,9 @@
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>();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99834.335077.patch
Type: text/x-patch
Size: 658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210403/eec9d1ab/attachment.bin>
More information about the llvm-commits
mailing list