[llvm] r230023 - Put MSVC back into the dumb compiler's corner.

Benjamin Kramer benny.kra at googlemail.com
Fri Feb 20 08:35:42 PST 2015


Author: d0k
Date: Fri Feb 20 10:35:42 2015
New Revision: 230023

URL: http://llvm.org/viewvc/llvm-project?rev=230023&view=rev
Log:
Put MSVC back into the dumb compiler's corner.

It fails to compile std::trivially_copyable for forward-declared enums.

Modified:
    llvm/trunk/include/llvm/Support/type_traits.h

Modified: llvm/trunk/include/llvm/Support/type_traits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/type_traits.h?rev=230023&r1=230022&r2=230023&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/type_traits.h (original)
+++ llvm/trunk/include/llvm/Support/type_traits.h Fri Feb 20 10:35:42 2015
@@ -28,10 +28,10 @@ namespace llvm {
 /// type can be copied around with memcpy instead of running ctors etc.
 template <typename T>
 struct isPodLike {
-  // std::is_trivially copyable is available in libc++ with clang, libstdc++
-  // that comes with GCC 5 and MSVC 2013.
+  // std::is_trivially_copyable is available in libc++ with clang, libstdc++
+  // that comes with GCC 5.
 #if (__has_feature(is_trivially_copyable) && defined(_LIBCPP_VERSION)) ||      \
-    (defined(__GNUC__) && __GNUC__ >= 5) || defined(_MSC_VER)
+    (defined(__GNUC__) && __GNUC__ >= 5)
   // If the compiler supports the is_trivially_copyable trait use it, as it
   // matches the definition of isPodLike closely.
   static const bool value = std::is_trivially_copyable<T>::value;





More information about the llvm-commits mailing list