Skip to content
Commit e1cb2c0f authored by Fangrui Song's avatar Fangrui Song
Browse files

[Object] Change ObjectFile::getSectionContents to return Expected<ArrayRef<uint8_t>>

Change
std::error_code getSectionContents(DataRefImpl, StringRef &) const;
to
Expected<ArrayRef<uint8_t>> getSectionContents(DataRefImpl) const;

Many object formats use ArrayRef<uint8_t> as the underlying type, which
is generally better than StringRef to represent binary data, so change
the type to decrease the number of type conversions.

Reviewed By: ruiu, sbc100

Differential Revision: https://reviews.llvm.org/D61781

llvm-svn: 360648
parent fe1aec0d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment