<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 19, 2014 at 9:28 AM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
> On 2014-Jun-19, at 00:03, Alp Toker <<a href="mailto:alp@nuanti.com">alp@nuanti.com</a>> wrote:<br>
><br>
><br>
> On 19/06/2014 09:10, Craig Topper wrote:<br>
>> Author: ctopper<br>
>> Date: Thu Jun 19 01:10:58 2014<br>
>> New Revision: 211254<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=211254&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=211254&view=rev</a><br>
>> Log:<br>
>> Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert.<br>
><br>
><br>
> Hi Craig,<br>
><br>
> While working on this commit did you get a feel for whether we could get rid of the llvm_unreachable() string parameter?<br>
><br>
> The llvm_unreachable("Unexpected enum value/XYZ") messages always looked less-than-useful to me. Unlike asserts they get used in places that are genuinely unreachable, even used as an optimisation hint in release builds. As a result the strings are seldom seen, making the small but conscious effort it takes to write them somewhat demeaning.<br>

><br>
> Alp.<br>
<br>
</div>They also get used in places that are supposed to be unreachable, but aren't.  When<br>
we get a crash, I think it's good to know why.<br>
<br>
At least, I appreciate the messages.</blockquote><div><br></div><div>The message also serves as documentation to the reader about why this particular point is unreachable, so I'd like to keep them.</div></div></div></div>