[PATCH] D79507: [flang] Change DIE("unreachable") cases to use llvm_unreachable

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 11:53:01 PDT 2020


tskeith added a comment.

In D79507#2066839 <https://reviews.llvm.org/D79507#2066839>, @jdoerfert wrote:

> There was a recent discussion on when to use what mechanism, I will link here once I find it again. I want to paraphrase some comments ppl made on this in IRC:
>  "assert/llvm_unreachable if it can't happen. if it happens then either fix the code so it really doesn't happen or use report_runtime_error. if the error really can happen then use report_runtime_error"


Both `DIE` and `llvm_unreachable` are for reporting internal errors. This discussion isn't about user errors.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79507/new/

https://reviews.llvm.org/D79507





More information about the llvm-commits mailing list