[llvm] r221013 - Define LLVM_NOEXCEPT with MSVC 14 CTP 3 or newer

Reid Kleckner reid at kleckner.net
Fri Oct 31 16:02:40 PDT 2014


Author: rnk
Date: Fri Oct 31 18:02:40 2014
New Revision: 221013

URL: http://llvm.org/viewvc/llvm-project?rev=221013&view=rev
Log:
Define LLVM_NOEXCEPT with MSVC 14 CTP 3 or newer

We have to use _MSC_FULL_VER here as CTP 2 and earlier didn't define
noexcept to my knowledge.

Fixes build error in lib/Support/Error.cpp when inheriting from
std::error_category, which has a noexcept virtual method.

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=221013&r1=221012&r2=221013&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Fri Oct 31 18:02:40 2014
@@ -66,7 +66,7 @@
 #define LLVM_MSC_PREREQ(version) 0
 #endif
 
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) || (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190022129LL)
 #define LLVM_NOEXCEPT noexcept
 #else
 #define LLVM_NOEXCEPT





More information about the llvm-commits mailing list