<div dir="ltr">rnk@, in the current patch we do install multiple exception handlers.  But I agree it would be preferable if we could install only 1.  The question is: How do you get the struct of bools into the exception handler?  Do you make it a global?  Kinda ugly, but if there's a nice solution it would be great.</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 6, 2016 at 2:04 PM Reid Kleckner via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">rnk added a comment.<br class="gmail_msg">
<br class="gmail_msg">
In <a href="https://reviews.llvm.org/D27238#614137" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D27238#614137</a>, @kcc wrote:<br class="gmail_msg">
<br class="gmail_msg">
> Dunno. As is the change increases the code size w/o solving any problem.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
The problem, as I see it, is that SetSigFooHandler pattern exposes the wrong cross-platform API. On Windows, we will install exactly one exception handler, switch on the exception code, and then decide whether to catch it based on the user's options.<br class="gmail_msg">
<br class="gmail_msg">
Would you be OK with this direction if we had a struct of bools instead of a struct of callbacks?<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Repository:<br class="gmail_msg">
  rL LLVM<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D27238" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D27238</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>