[cfe-commits] Switching assert(0/false to llvm_unreachable

David Blaikie dblaikie at gmail.com
Wed Sep 21 12:58:08 PDT 2011


As per recent discussions on cfe-commits, here's a patch to change all
sure-failing assertions to llvm_unreachables (this task was made easier by
the canonicalization of these asserts that Richard's been doing with the new
boolean conversion from string warning - which meant there were only two
major cases ("assert(0 &&" and "assert(false &&" - I don't think I found any
message-less asserts in clang though I think there are some in LLVM
itself)). The only other thing I had to do was some 80 col wraps due to the
increase in length.

If this is the right thing just say the word & I'll check it in.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110921/a95453e8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unreachable.diff
Type: application/octet-stream
Size: 121818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110921/a95453e8/attachment.obj>


More information about the cfe-commits mailing list