[PATCH] D79507: [flang] Change DIE("unreachable") cases to use llvm_unreachable
David Truby via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 06:00:17 PDT 2020
DavidTruby added a subscriber: mehdi_amini.
DavidTruby added a comment.
> That all having been said, I'm open to having more granular flags for essentially selecting NDEBUG on a subproject level when configuring. I can certainly see why that might be convenient while working on development of a particular subproject for running test suites and the like.
I'm fine with this, it's something that @mehdi_amini and I both proposed as a way forward in a previous discussion on this: (see here https://github.com/flang-compiler/f18/issues/966). It's also not an issue building flang without NDEBUG and llvm with; we had accidentally been doing this since merging until I fixed the discrepancy yesterday (see here https://reviews.llvm.org/rG81bf1e29aae5992db318803ba4722a585ad64638).
I would want this toggleable flag to still be toggling the standard LLVM error handling mechanisms though, namely `llvm_unreachable` for unreachable cases and `assert` for function preconditions, so that people submitting code for flang can follow the LLVM coding guidelines and not have their patches rejected on those grounds.
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