[llvm-commits] [llvm] r132732 - /llvm/trunk/utils/TableGen/FastISelEmitter.cpp

David Blaikie dblaikie at gmail.com
Fri Jun 10 13:07:16 PDT 2011


>
> Like the comment says, llvm_unreachable() should be used in lieu of assert
> (0).  Otherwise, assert (cond && "msg") should be used for code that is
> expected to execute.
>

Right - but in this case the code could be either. It's not a question of
assert(0) versus llvm_unreachable - in which case I'd favor the latter,
certainly. It's a question of assert(cond && "msg") and (sort of) if (cond)
{ llvm_unreachable; } (it's not that simple - there's a difference in
legibility between the two actual options, etc)

- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110610/d41e1fe9/attachment.html>


More information about the llvm-commits mailing list