[llvm] r260654 - [ADT] OptionSet: ifdef out some code that seems to be crashing MSVC.

Argyrios Kyrtzidis via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 20:36:48 PST 2016


Author: akirtzidis
Date: Thu Feb 11 22:36:48 2016
New Revision: 260654

URL: http://llvm.org/viewvc/llvm-project?rev=260654&view=rev
Log:
[ADT] OptionSet: ifdef out some code that seems to be crashing MSVC.

Modified:
    llvm/trunk/include/llvm/ADT/OptionSet.h

Modified: llvm/trunk/include/llvm/ADT/OptionSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/OptionSet.h?rev=260654&r1=260653&r2=260654&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/OptionSet.h (original)
+++ llvm/trunk/include/llvm/ADT/OptionSet.h Thu Feb 11 22:36:48 2016
@@ -116,6 +116,8 @@ public:
   }
 
 private:
+#ifndef _MSC_VER
+  // This is crashing MSVC.
   template <typename T>
   static auto _checkResultTypeOperatorOr(T t) -> decltype(t | t) { return T(); }
 
@@ -124,6 +126,7 @@ private:
   static_assert(!std::is_same<decltype(_checkResultTypeOperatorOr(Flags())),
                               Flags>::value,
                 "operator| should produce an OptionSet");
+#endif
 };
 
 }




More information about the llvm-commits mailing list