[PATCH] D61781: [Object] Change ObjectFile::getSectionContents to use Expected
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 10 09:15:18 PDT 2019
MaskRay marked an inline comment as done.
MaskRay added inline comments.
================
Comment at: llvm/include/llvm/Object/ObjectFile.h:458
inline std::error_code SectionRef::getContents(StringRef &Result) const {
- return OwningObject->getSectionContents(SectionPimpl, Result);
+ Expected<ArrayRef<uint8_t>> Res =
+ OwningObject->getSectionContents(SectionPimpl);
----------------
sbc100 wrote:
> Looks like an opportunity for a followup change to propagate the use of ArrayRef here too?
Thanks for review! Yes, a few more functions to refactor. I didn't change this function in this patch because it has 48 references...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61781/new/
https://reviews.llvm.org/D61781
More information about the llvm-commits
mailing list