[llvm] [Verifier] Use not --crash for assertion (PR #174296)
Manuel Carrasco via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 5 04:07:25 PST 2026
mgcarrasco wrote:
Just sharing in case it is helpful, there are two cases handling this error with the same error message:
- https://github.com/llvm/llvm-project/blob/984c57794f9e8253ababfebe84303bda33e8f388/llvm/lib/IR/Verifier.cpp#L3793
- https://github.com/llvm/llvm-project/blob/984c57794f9e8253ababfebe84303bda33e8f388/llvm/include/llvm/IR/Instructions.h#L2653
The failing test case must be caused by `Instructions.h`. The crash could be avoided if the assertion is replaced with `llvm::reportFatalUsageError` this will trigger `exit(1)` and not an `abort()`. I think this is what @arsenm is suggesting/expecting.
I'm not sure if the assertion is necessarily wrong. I guess the assertion in `Instruction.h` could potentially also be triggered by an internal error in the compiler. The problem might actually be how `llvm-as` handles errors and it may make sense to use `not -crash` in the test until improved. @arsenm what do you think?
https://github.com/llvm/llvm-project/pull/174296
More information about the llvm-commits
mailing list