r319297 - Toolchain: Normalize dwarf, sjlj and seh eh

Martell Malone via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 1 23:23:00 PST 2017


Just catching up on this now.
r319363 looks good to me, It makes little sense to use GNU SEH in that case.

My remaining concern is mostly about why we still need the workaround for
> x86 in the function getting the default (returning None instead of WinEH
> for that case). But as long as this works and the rest of this change can
> settle, we can look at that later if any further change is warranted at all.
>
It seemed to work fine but the sanitizer does not support this setup for
x86 quite yet.
It is a little outside my scope of focus right now so will probably come
back to it much later.


On Wed, Nov 29, 2017 at 2:07 PM, Martin Storsjö <martin at martin.st> wrote:

> On Wed, 29 Nov 2017, Martin Storsjö via cfe-commits wrote:
>
> On Wed, 29 Nov 2017, Reid Kleckner wrote:
>>
>> On Wed, Nov 29, 2017 at 12:21 PM, Martin Storsjö <martin at martin.st>
>>> wrote:
>>>       On Wed, 29 Nov 2017, Martell Malone via cfe-commits wrote:
>>>             Thanks for letting me know Reid.
>>>             I’ll in work and won’t be able to access the repo
>>>             until lunch time. (~3
>>>             hours)
>>>             Feel free to revert if it is not trivial.
>>>
>>>             The easy fix might be to change to == x86_64 from !=
>>>             x86 For is Windows in
>>>             the default toolchain. That should restore the old
>>>             behavior.
>>>
>>>
>>>       My suggestion would be to just return None for all architectures
>>>       for the default windows (msvc) case. We didn't use to set any
>>>       defines to indicate EH mode there before anyway, so setting it
>>>       to None should make things behave just as before, right?
>>>
>>>
>>> I did this slightly differently in r319363, but maybe that's silly. My
>>> reasoning was that `clang -cc1 -fseh-exceptions -fexceptions` in the MSVC
>>> environment should still use __CxxFrameHandler3. -fseh-exceptions
>>> indicates
>>> what format of unwind information we should use, and we're still using
>>> the
>>> normal SEH .xdata opcodes.
>>>
>>
>> No, I think this change makes sense - I was just about to write a comment
>> pointing out this spot in the code but was waiting for a compile to finish
>> before posting.
>>
>> Alternatively, you could view -fseh-exceptions, -fdwarf-exceptions, and
>>> -fsjlj-exceptions as choices of EH personality function,
>>>
>>
>> No, I don't think that'd make sense
>>
>
> FWIW, another reason I don't think that makes sense, is that making a
> GNU_CPlusPlus_SEH + MSVC combination probably would require quite a bit
> more changes as well.
>
> When I tested the same in a build with assertions enabled, I didn't get
> the references to _Unwind_Resume as you did, but the compilation failed on
> some internal assertion. So making GNU_CPlusPlus_SEH usable with the
> microsoft C++ ABI would probably require a significant amount of more work,
> for very little value.
>
> // Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171201/aee665fc/attachment.html>


More information about the cfe-commits mailing list