[llvm] r197992 - Fix the MSVC 2010 build
Alp Toker
alp at nuanti.com
Tue Dec 24 17:15:37 PST 2013
Author: alp
Date: Tue Dec 24 19:15:36 2013
New Revision: 197992
URL: http://llvm.org/viewvc/llvm-project?rev=197992&view=rev
Log:
Fix the MSVC 2010 build
C++11-style forward declared enums weren't supported until MSVC 2012.
Modified:
llvm/trunk/include/llvm/Support/Compiler.h
Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=197992&r1=197991&r2=197992&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Tue Dec 24 19:15:36 2013
@@ -397,12 +397,19 @@
/// 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
More information about the llvm-commits
mailing list