diff options
author | Alp Toker <alp@nuanti.com> | 2013-12-29 07:39:53 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-12-29 07:39:53 +0000 |
commit | 748618bee1b1e43b8e7343faf6e9f7e1fdc44297 (patch) | |
tree | a8e5a2e7e4efa5af9d1858a032605ab2e141ce35 /include | |
parent | a71d72a0594287c4d6bd7a2d58dd988f02ee3d07 (diff) | |
download | llvm-748618bee1b1e43b8e7343faf6e9f7e1fdc44297.tar.gz llvm-748618bee1b1e43b8e7343faf6e9f7e1fdc44297.tar.bz2 llvm-748618bee1b1e43b8e7343faf6e9f7e1fdc44297.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/Compiler.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index e2bcd563b0..aa66a4ea52 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -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 |