[llvm] [ConstantInt] Disable implicit truncation in ConstantInt::get() (PR #171456)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 04:16:07 PDT 2026


nikic wrote:

> For the next time we do breaking changes like this, we should probably add appropriate assertions to the header files as well.

I don't understand what you mean by this. Do you want to duplicate the assert from the APInt constructor into other places? Why?

FWIW, if we wanted to, we could still truncate in non-assertion builds, but I'm not convinced that this is a good idea. I don't think we try to gracefully handle invalid inputs (that assert) anywhere else in LLVM.

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


More information about the llvm-commits mailing list