[llvm-dev] [RFC] Error handling in LLVM libraries.

Rafael EspĂ­ndola via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 10 10:31:51 PST 2016


> 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


More information about the llvm-dev mailing list