Fix the MSVC 2010 build
authorAlp Toker <alp@nuanti.com>
Wed, 25 Dec 2013 01:15:36 +0000 (01:15 +0000)
committerAlp Toker <alp@nuanti.com>
Wed, 25 Dec 2013 01:15:36 +0000 (01:15 +0000)
C++11-style forward declared enums weren't supported until MSVC 2012.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197992 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Compiler.h

index c94c9b359d432b2b05b21a5bec5b4e4704f4ccb7..3e1b5fe5f98b7d3ea940e3b8d21e2e8b83dc222e 100644 (file)
 /// with MSVC.
 #if __has_feature(cxx_strong_enums)
 # define LLVM_ENUM_INT_TYPE(intty) : intty
-#define LLVM_HAS_STRONG_ENUMS 1
 #elif defined(_MSC_VER) && _MSC_VER >= 1600  // Added in MSVC 2010.
 # define LLVM_ENUM_INT_TYPE(intty) : intty
-#define LLVM_HAS_STRONG_ENUMS 1
 #else
 # define LLVM_ENUM_INT_TYPE(intty)
+#endif
+
+/// \brief Does the compiler support C++11 semantics for strongly typed forward
+/// declared enums?
+#if __has_feature(cxx_strong_enums)
+#define LLVM_HAS_STRONG_ENUMS 1
+#elif defined(_MSC_VER) && _MSC_VER >= 1700 // Added in MSVC 2012.
+#define LLVM_HAS_STRONG_ENUMS 1
+#else
 #define LLVM_HAS_STRONG_ENUMS 0
 #endif