<div dir="ltr">I'd think it is probably better to discontinue this thread. I have a local patch to do what I can at this moment. I'll send it for review, so let's discuss on that review thread.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 26, 2016 at 9:25 AM, Rafael EspĂ­ndola <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"><span class="">> I believe, however, that even when we want this functionality in a library, we don't want the implementation to be "error_code spaghetti."<br>
<br>
</span>My opinion too. If some utility code is really useful, sure, we add<br>
error_code and move it to llvm, but I would like to avoid having all<br>
of lld look like that.<br>
<span class=""><br>
> I propose that, for the purpose of treating lld as a library, we enable exception handling and use C++ exceptions. All of my users who use LLVM components as a library (for JIT, etc.) insist that I build LLVM with exceptions (and RTTI for that matter) enabled. For the purpose of creating a stand-alone lld build, we could certainly build with exceptions disabled if that yields a measurable performance difference.<br>
><br>
> Thoughts?<br>
<br>
</span>Something along those lines should work. We would probably still need<br>
a diag handler, but it would now *not* be fatal and 'error' would look<br>
like<br>
<br>
* call diag handler<br>
* if no exceptions, exit(1)<br>
* else, throw<br>
<br>
The reason being that it is a lot easier to print errors close to<br>
where they are found and we want to do it when exceptions are disabled<br>
too.<br>
<br>
Thanks,<br>
<div class="HOEnZb"><div class="h5">Rafael<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>
</div></div></blockquote></div><br></div>