Re: [lldb-dev] Reporting source errors from MCCodeEmitter::encodeInstruction() ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [lldb-dev] Reporting source errors from MCCodeEmitter::encodeInstruction() ?

Hans Wennborg via cfe-dev
This is the LLDB mailing list but your questions seems to be just about Clang (?).

+cfe-dev and -lldb-dev

> On 30. Jan 2020, at 12:35, Thomas Goodfellow via lldb-dev <[hidden email]> wrote:
>
> We have a backend for a target that at present only detects some
> assembler errors when emitting instructions (basically because the
> platform has configurable properties with dependencies between
> instructions and it was easier to check for their interaction late
> than try to detect them earlier, e.g. through custom encoder methods
> and tablegen). Emitting diagnostics through
> SourceManager::PrintMessage() "works" in the limited sense of
> communicating the problem to a human, however it doesn't prevent
> generation of an incorrect output file or change the process exit
> code.
>
> We'd prefer not to resort to report_fatal_error() since that isn't a
> polite way to diagnose problems in the source.
>
> Is there a sensible way to properly signal a source error from the
> level of encodeInstruction()? Or is it expected that all such errors
> are reported earlier?
> _______________________________________________
> lldb-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev