efriedma-quic wrote:

In a lot of cases, we report_fatal_error because we don't actually expect users 
to run into the issues... indicate some internal inconsistency in the compiler, 
or some unsupported configuration, or something like that.  Because of this, 
report_fatal_error prints the standard "report a bug" crash message.   For 
inline asm specifically, emitError from the backend is probably best in most 
cases, so non-clang frontends get better diagnostics, and we don't have to 
duplicate code.

> In other words we have to return something wrong intentionally to continue 
> compilation

Yes, this can be a bit tricky in some cases, but usually there's something 
straightforward you can do (for example, drop the inline asm stmt).  Note that 
we don't actually generate an output file, so it doesn't matter what you do as 
long as it doesn't cause something else to crash.

https://github.com/llvm/llvm-project/pull/96363
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to