[PATCH] D16025: [RS4GC] Replace some asserts by similar code using report_fatal_error().

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 19:58:38 PST 2016


On Mon, Jan 11, 2016 at 7:27 PM, Manuel Jacob via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> mjacob added a comment.
>
> At some point in the future I want to be able to compile the language I'm
> working on using a stable released version of LLVM, which is usually
> compiled with assertions disabled. Currently invalid input IR can lead to
> undefined (or at least unwanted) behaviour if assertions are disabled.
>

If the input IR is invalid, it should be the verifier, not an
optimization/analysis pass that catches this. Include test cases that
demonstrate that the verifier correctly diagnoses the new cases you're
adding.


>
> Assertions shouldn't be used for input validation. Instead they should be
> used for catching programming errors. If you think I've rewritten an
> assertion that falls into the latter category, we can discuss that, though.
>
>
> http://reviews.llvm.org/D16025
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160111/f6eb4383/attachment.html>


More information about the llvm-commits mailing list