Hi Rafael,
The commit log is short on details -- could you explain why this change was needed?
The new ErrorOr<std::unique_ptr<MemoryBuffer>> pattern looks really verbose compared to what was there before, mostly doubling the lines of code you have to write to create a MemoryBuffer for a file.
And it's no longer possible to do if (std::error_code EC = ...) which makes error-checking an explicit step that's easy to forget.
I know ObjectFile is moving fast right now so guess we can wrap the functions to present a more conventional API for clang until that work settles, or maybe just try getting used to this form, but I wanted to check in with you first.
Alp.