<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 9, 2016 at 9:42 PM, David Blaikie 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"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 9, 2016 at 7:42 PM, Paul Hancock <span dir="ltr"><<a href="mailto:Paul.Hancock.17041993@live.com" target="_blank">Paul.Hancock.17041993@live.com</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 style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>I should be able to flush/shutdown everything and reinit/restart it like I do everything else, it would be pretty bad design to not be able to.<br></p></div></div></blockquote><div>Yeah, it's far from perfect, but error handling can be difficult/expensive to weave through every layer. So for certain kinds of errors we don't do that sort of thing.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif"><p>On a similar issue, calling llvm_shutdown and reinitialising everything leads to problems as it doesn't appear that llvm is being reinitialised correctly, this seems to be a bug unless there's an extra function call I'm missing that isn't needed at first startup?<br></p></div></div></blockquote><div>In theory this should work, of course - if you've got specific things that seem to not be working, might be worth filing a bug, etc?<br>I'm not sure how well tested/exercised the llvm_shutdown path is. (equally, most stuff should just be in the LLVMContext & should be able to destroy that and make a new one without the full shutdown/re-init, not sure if that path is any better tested/used, though)<br><br>(perhaps someone else on llvm-dev can chime in if I'm giving an incorrectly pessimistic representation of the state of things) </div></div></div></div></blockquote><div><br></div><div>Recovering from fatal errors by throwing an exception might work, and you're welcome to try it. I've heard that people do this and it "works" in practice. Just be aware that we don't provide a warranty. We're especially bad at reinitializing. </div></div></div></div>