I've replaced asserts which check restrictions on the input IR or for
unimplemented cases. The point is to have these checks also in release builds.
Details
- Reviewers
reames
Diff Detail
Event Timeline
In general, I don't like the idea of this patch. Can you give a specific reason why you want this?
At some point in the future I want to be able to compile the language I'm working on using a stable released version of LLVM, which is usually compiled with assertions disabled. Currently invalid input IR can lead to undefined (or at least unwanted) behaviour if assertions are disabled.
Assertions shouldn't be used for input validation. Instead they should be used for catching programming errors. If you think I've rewritten an assertion that falls into the latter category, we can discuss that, though.
Note: there are two more comments on the mailing list which didn't end up showing here.
I'm abandoning this revision because the verifier should be extended to check restrictions on the input IR instead of adding report_fatal_error() in the RS4GC pass.