llvm-project/llvm/tools/llvm-objcopy/COFF
Fangrui Song e1cb2c0f40 [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
2019-05-14 04:22:51 +00:00
..
COFFObjcopy.cpp [llvm-objcopy] Add --prefix-alloc-sections 2019-05-08 09:49:35 +00:00
COFFObjcopy.h [llvm-objcopy][NFC] More error propagation 2019-01-30 14:36:53 +00:00
Object.cpp [llvm-objcopy] [COFF] Fix handling of aux symbols for big objects 2019-01-23 11:54:51 +00:00
Object.h [llvm-objcopy] [COFF] Fix handling of aux symbols for big objects 2019-01-23 11:54:51 +00:00
Reader.cpp [Object] Change ObjectFile::getSectionContents to return Expected<ArrayRef<uint8_t>> 2019-05-14 04:22:51 +00:00
Reader.h [llvm-objcopy] [COFF] Update symbol indices in weak externals 2019-01-22 10:58:09 +00:00
Writer.cpp [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includes 2019-03-13 23:40:16 +00:00
Writer.h [llvm-objcopy] [COFF] Fix handling of aux symbols for big objects 2019-01-23 11:54:51 +00:00