[PATCH] D12098: [WinEH] Calculate state numbers for the new EH representation

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 09:05:17 PDT 2015


We have no idea at initialization time if the user wants to target win32 or
the host, so we couldn't conditionalize it if we wanted to.

We initialize the pass so that we can run it from opt and test it in
isolation. It's consistent what NVPTX does in
llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp. We just copied the technique.

On Tue, Sep 1, 2015 at 6:35 AM, Vladislav <vlad at ispras.ru> wrote:

> ivladak added a subscriber: ivladak.
> ivladak added a comment.
>
> Could you please explain why you
>
>   initializeWinEHStatePassPass(PR);
>
> in `LLVMInitializeX86Target()` regardless of whether the target is win32
> or not?
>
> Sorry if the question is silly. I actually have NFC about what's going on
> in this commit.
>
> I am getting some nasty memory corruption problems which might or might
> not be caused by this unconditional initialization.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D12098
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150901/e5e1e70d/attachment.html>


More information about the llvm-commits mailing list