[PATCH] D61781: [Object] Change ObjectFile::getSectionContents to use Expected

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 07:50:09 PDT 2019


sbc100 accepted this revision.
sbc100 added inline comments.
This revision is now accepted and ready to land.


================
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);
----------------
Looks like an opportunity for a followup change to propagate the use of ArrayRef here too?


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