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

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


I spoke too soon. We don't need ifdefs because the overrider can have a
more restrictive EH specification.

I guess you're saying that I can relax the version check to
LLVM_MSC_PREREQ(1900).

On Mon, Nov 3, 2014 at 10:06 AM, Reid Kleckner <rnk at google.com> wrote:

> 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/ae82e3e5/attachment.html>


More information about the llvm-commits mailing list