[llvm] r336174 - [Support] This sanity check in the test only works with certain versions

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 00:51:01 PDT 2018


Author: chandlerc
Date: Tue Jul  3 00:51:01 2018
New Revision: 336174

URL: http://llvm.org/viewvc/llvm-project?rev=336174&view=rev
Log:
[Support] This sanity check in the test only works with certain versions
of libstdc++, not just certain versions of GCC. The original macros
broke when using Clang + libstdc++4.9 sadly.

Sadly, testing for versions of libstdc++ has been extremely problematic
in the past, so I'm just narrowing this down to Windows and when using
libc++ as that seems at least very unlikely to keep build bots broken.

Modified:
    llvm/trunk/unittests/Support/TypeTraitsTest.cpp

Modified: llvm/trunk/unittests/Support/TypeTraitsTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TypeTraitsTest.cpp?rev=336174&r1=336173&r2=336174&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/TypeTraitsTest.cpp (original)
+++ llvm/trunk/unittests/Support/TypeTraitsTest.cpp Tue Jul  3 00:51:01 2018
@@ -26,7 +26,7 @@ void TrivialityTester() {
                     IsTriviallyMoveConstructible,
                 "Mismatch in expected trivial move construction!");
 
-#if __clang__ || _MSC_VER || __GNUC__ > 5
+#if defined(_LIBCPP_VERSION) || defined(_MSC_VER)
   // On compilers with support for the standard traits, make sure they agree.
   static_assert(std::is_trivially_copy_constructible<T>::value ==
                     IsTriviallyCopyConstructible,




More information about the llvm-commits mailing list