[llvm] r264425 - [Object] Start threading Error through MachOObjectFile construction.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 27 09:51:55 PDT 2016
> Yeah - this will be pretty rare, and I want it to be ugly - nobody should
> use a pre-checked error except for the error-as-out-parameter idiom.
> Actually Error::errorAsOutParameter() sounds good. :)
And even that is only for constructors, right? Otherwise one should
use Expected.
In fact, using an std::error_code (or equivalent) as a parameter of
constructed always looked a bit odd IMHO. With good move constructors
we should be able to have trivial private constructors and always use
an static create method that returns an ErrorOr (or equivalent).
Cheers,
Rafael
More information about the llvm-commits
mailing list