[PATCH] D122170: Adjust `llvm_unreachable` macro to account for platforms that don't define LLVM_BUILTIN_UNREACHABLE
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 13:07:57 PDT 2022
dexonsmith accepted this revision.
dexonsmith added a comment.
This revision is now accepted and ready to land.
LGTM!
================
Comment at: llvm/include/llvm/Support/ErrorHandling.h:139-140
///
/// Use this instead of assert(0). It conveys intent more clearly and
/// allows compilers to omit some unnecessary code.
#ifndef NDEBUG
----------------
Maybe worth adding something about warnings?
Something like:
```
/// ... It conveys intent more clearly, suppresses diagnostics
/// for unreachable code paths, and
/// allows compilers to omit unnecessary code.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122170/new/
https://reviews.llvm.org/D122170
More information about the llvm-commits
mailing list