<div dir="ltr"><div><div><div><div>Thanks, David.<br><br></div><div>I share your doubt.<br><br></div><div>Unfortunately, the author is not around to ask what was intended/correct. So, I want to have a trap there in case we will get a real case, then somebody will complain and we will get more details.<br><br></div>I like the idea of having an assert instead of unreachable. That will serve the same purpose but more cleanly. I will prepare a patch.<br><br></div>In any case I will follow up in a while to either address an issue the asserts may introduce or to remove the redundancy from the code.<br><br></div>Thanks<br><br></div>Galina<br><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 12, 2017 at 9:52 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.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">+1, this seems odd.<br><br>If the code is really:<br><br>  if (x)<br>    y()<br>  unreachable<br><br>it should be replaced by:<br><br>  assert(x);<div>  y();<br><br>but I /doubt/ that's what's intended/correct, though I could be wrong - I haven't looked at the code in any detail other than what's shown in the diff.</div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Sat, Jun 10, 2017 at 2:03 AM Davide Italiano via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">On Sat, Jun 10, 2017 at 1:04 AM, Galina Kistanova via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: gkistanova<br>
> Date: Sat Jun 10 03:04:51 2017<br>
> New Revision: 305144<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=305144&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=305144&view=rev</a><br>
> Log:<br>
> Added llvm_unreachable to address warning: this statement may fall through. NFC.<br>
><br>
<br>
Are you really sure `llvm_unreachable()` is the right choice here?<br>
It seems a break would do it.<br>
<br>
--<br>
Davide<br>
<br>
"There are no solved problems; there are only problems that are more<br>
or less solved" -- Henri Poincare<br></div></div><span class="">
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</span></blockquote></div>
</blockquote></div><br></div></div>