[llvm] r198158 - Make LLVM_MSC_PREREQ() compatible with all MSVC versions
Alp Toker
alp at nuanti.com
Sat Dec 28 23:39:53 PST 2013
Author: alp
Date: Sun Dec 29 01:39:53 2013
New Revision: 198158
URL: http://llvm.org/viewvc/llvm-project?rev=198158&view=rev
Log:
Make LLVM_MSC_PREREQ() compatible with all MSVC versions
The defined() preprocessor expansion wasn't working out on the lld builder.
Also update the documentation to cover another Visual Studio release versioning
convention.
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=198158&r1=198157&r2=198158&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Sun Dec 29 01:39:53 2013
@@ -43,11 +43,14 @@
/// \macro LLVM_MSC_PREREQ
/// \brief Is the compiler MSVC of at least the specified version?
/// The common \param version values to check for are:
-/// * 1600: Microsoft Visual Studio 2010
-/// * 1700: Microsoft Visual Studio 2012
-/// * 1800: Microsoft Visual Studio 2013
-#define LLVM_MSC_PREREQ(version) \
- (defined(_MSC_VER) && _MSC_VER >= (version))
+/// * 1600: Microsoft Visual Studio 2010 / 10.0
+/// * 1700: Microsoft Visual Studio 2012 / 11.0
+/// * 1800: Microsoft Visual Studio 2013 / 12.0
+#ifdef _MSC_VER
+#define LLVM_MSC_PREREQ(version) (_MSC_VER >= (version))
+#else
+#define LLVM_MSC_PREREQ(version) 0
+#endif
/// \brief Does the compiler support r-value references?
/// This implies that <utility> provides the one-argument std::move; it
More information about the llvm-commits
mailing list