From 76b80d1a989b120f970c19757e320b3b62d69276 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Wed, 25 Dec 2013 01:15:36 +0000 Subject: [PATCH] Fix the MSVC 2010 build 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 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index c94c9b359d4..3e1b5fe5f98 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -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 -- 2.34.1