[llvm] r197895 - Define LLVM_HAS_STRONG_ENUMS
Alp Toker
alp at nuanti.com
Sun Dec 22 14:19:50 PST 2013
Author: alp
Date: Sun Dec 22 16:19:49 2013
New Revision: 197895
URL: http://llvm.org/viewvc/llvm-project?rev=197895&view=rev
Log:
Define LLVM_HAS_STRONG_ENUMS
This is needed to guard an upcoming feature in clang until the C++11 transition
is complete, at which point it can be removed.
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=197895&r1=197894&r2=197895&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Sun Dec 22 16:19:49 2013
@@ -397,10 +397,13 @@
/// 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)
+#define LLVM_HAS_STRONG_ENUMS 0
#endif
/// \brief Does the compiler support generalized initializers (using braced
More information about the llvm-commits
mailing list