[llvm] [TableGen] Use guarded assert in constexpr functions (PR #194728)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 08:23:13 PDT 2026


jurahul wrote:

> > Why can't it just be assert (which seems to work everywhere?) and then the function returning some dummy value?
> 
> You mean "assert(false)"? Because older GCC will complain that there is a call to a non-constexpr function. With newer compilers the original "llvm_unreachable" was accepted, but a GCC 7.4.0 buildbot failed.

nvm, I got confused reviewing this from the phone. It seems this PR is doing what I was suggesting, that is. using an assert instead of llvm_unreachable.

https://github.com/llvm/llvm-project/pull/194728


More information about the llvm-commits mailing list