[llvm-dev] [RFC] Error handling in LLVM libraries.
Lang Hames via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 10 10:55:54 PST 2016
Hi Rafael,
> What prevents you from using a diag handler in the jit server that
> sends errors/warnings over the RPCChannel?
What would you do with errors that can't reasonable be serialized when they reach the diagnostic handler?
And what would you do with the serialized bytes on the client end?
- Lang.
Sent from my iPhone
On Feb 10, 2016, at 10:31 AM, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
>> I recently added support for remote JITing to ORC. There are in-tree library
>> facilities for JITing code into a process on the other end of an abstract
>> "RPCChannel". What happens if something goes wrong at one end? We want to be
>> able to communicate an error back across the RPCChannel (assuming it's still
>> intact) so the other side can recover or fail gracefully. That means we need
>> to be able to serialize an error with enough information to describe what
>> went wrong. There's no practical way to maintain a serialization routine for
>> all possible std::error_codes that might come up, even if they were powerful
>> enough to describe everything that could go wrong (which again, being static
>> kinds, they're not). With my proposal however, a JITError base class can be
>> defined as:
>>
>> class JITError : public TypedErrorInfo<JITError> {
>> public:
>> virtual void serialize(RPCChannel &C) const = 0;
>> };
>
> What prevents you from using a diag handler in the jit server that
> sends errors/warnings over the RPCChannel?
>
> Cheers,
> Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160210/2977debb/attachment.html>
More information about the llvm-dev
mailing list