<div dir="ltr"><div>This was intentional, since the old implementation was broken. VS projects set /EHsc by default, so users who weren't actively using EH were automatically getting EH anyway, which would crash the compiler. I can't reasonably ask everyone who wants to try clang to manually change their VS project settings, so I made clang-cl temporarily ignore /EHs.<br></div><div><br></div><div>We've started over with new LLVM IR constructs for representing Windows EH, and when that's done, we can make /EHs enable it. For now you have to pass all of the following to clang-cl to try the new implementation:</div><div>-Xclang -fexceptions -Xclang -fcxx-exceptions -Xclang -fnew-ms-eh</div><div><br></div><div>The current status is that we can catch some 32-bit exceptions, but will usually crash at runtime. The compiler will reject destructor cleanups very late during codegen.<br></div><div><br></div><div>Hope that helps.</div><div><br></div><div>For future reference, this is more of a cfe-dev kind of topic.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 2, 2015 at 3:25 AM, Russell Wallace via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Tried a small test just now to see how exception handling on Windows is getting on, and it seems to work except for one thing.</div><div><br></div><div>clang-cl /EHsc (the Microsoft compiler option to enable exceptions) doesn't do anything; they remain disabled. However, -Xclang -fcxx-exceptions succeeds. Is this a bug in the handling of compatibility options or am I missing something?</div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>