[PATCH] D38986: [Analyzer] Better unreachable message in enumeration

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 03:29:23 PDT 2017


NoQ added a comment.

> Does llvm_unreachable() guarantee that the string construction code is completely removed from release builds?

http://llvm.org/docs/CodingStandards.html#assert-liberally:

> When assertions are disabled (i.e. in release builds), `llvm_unreachable` becomes a hint to compilers to skip generating code for this branch. If the compiler does not support this, it will fall back to the “abort” implementation.

So i think it's fine. Not sure how much time it saves compared to writing these dumps (as a *lot* of places would need those).


https://reviews.llvm.org/D38986





More information about the cfe-commits mailing list