There are times that I want to generate an ERROR, but not stop processing of the code. An example of this would be when I find there is a value out of range for a specific operand.
producing the error for all instances of this class of errors would be good.
Also, I would like to have the error message have some relationship to the offending source.
Thanks,
Jack
Can you give a bit more context? The way LLVM handles errors varies a
lot depending on what you're doing.
-Eli
There are times that I want to generate an ERROR, but not stop processing of the code. An example of this would be when I find there is a value out of range for a specific operand.
producing the error for all instances of this class of errors would be good.
Also, I would like to have the error message have some relationship to the offending source.
This is something I’ve been looking into lately. Currently, you can use LLVMContext::emitError to send an error message to a registered error handler (see LLVMContext::setInlineAsmDiagnosticHandler). The handler can write the message to a log file, console, etc…
I want to extend this to support error/warning/info messages, and also associate source information if available.