[RFC] report_fatal_error and the default value of GenCrashDialog

Reviving this thread since it came up again in [Support] report_fatal_error: Do not generate crash backtrace by default by optimisan · Pull Request #128495 · llvm/llvm-project · GitHub.

I really think the LLVM usage of report_fatal_error is far more standard, just based on the name of the function: it clearly means report an error to the user and terminate the process.

Using it for “should not happen” is the non-standard intent. That should be some form of assertion. I don’t understand what you mean by “it’s stronger than assertions” – surely that can be handled by having different flavours of assertion function: assert_with_diagnostic or assert_with_backtrace or whatever.

I’m strongly in favour of #128495 or something like it.

2 Likes