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

Reid Kleckner rnk at google.com
Mon Nov 3 10:06:06 PST 2014


I guess we should have more targeted ifdefs that try to check the MSVC STL
version in Error.cpp to handle this case.

On Fri, Oct 31, 2014 at 4:56 PM, David Majnemer <david.majnemer at gmail.com>
wrote:

> Unconditional noexcept was added in VS2013 Nov CTP.  noexcept(expr) was
> added in VS "14" CTP 1.
>
> Sent from my phone.
>
>
> On Friday, October 31, 2014, Reid Kleckner <reid at kleckner.net> wrote:
>
>> 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
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141103/80fb1b57/attachment.html>


More information about the llvm-commits mailing list