This helps make clear that we're moving away from std::error_code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I like the idea of making it clearer that we're moving to Error as the standard error handling mechanism, but this could generate confusion because (at least the way I read them) these FIXMEs suggest that we could remove the error categories piecemeal, which isn't the case: To maintain compatibility with std::error_code (via the errorToErrorCode and expectedToErrorOr methods) we require that all error types be convertible to an equivalent error_code. We can't remove that requirement until all LLVM code has moved over to Error.
Comment Actions
Oh - I see this was motivated by http://reviews.llvm.org/D20550.
Maybe a re-worded FIXME would work:
// FIXME: This class is only here to support the transition to llvm::Error. It will be // removed once this transition is complete. Clients should prefer to deal with the // Error value directly, rather than converting to error_code.
It is a bit more verbose though.