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

Rafael Espíndola via llvm-dev
Thu, 18 Feb 2016 15:36:29 -0000

> I like this idea in general. It's a better implementation of what
> ErrorOr originally was before we removed the custom error support
> because it wasn't used. In fact I would actually support outright
> replacing ErrorOr with this if it can be done safely, as I find the
> name TypedErrorOr a bit long.


The main differences are
* This will hopefully be used.
* TypedErrorOr is really a TypedError or T. The situation before was
not that ErrorOr was std::error_code or T.

Since we are adding it, I would also support replacing every use of
ErrorOr with TypedErrorOr and renaming it.

Cheers,
Rafael