llvm/tools/llvm-objcopy/COFF
Hans Wennborg db4d724079 Unify the two CRC implementations
David added the JamCRC implementation in r246590. More recently, Eugene
added a CRC-32 implementation in r357901, which falls back to zlib's
crc32 function if present.

These checksums are essentially the same, so having multiple
implementations seems unnecessary. This replaces the CRC-32
implementation with the simpler one from JamCRC, and implements the
JamCRC interface in terms of CRC-32 since this means it can use zlib's
implementation when available, saving a few bytes and potentially making
it faster.

JamCRC took an ArrayRef<char> argument, and CRC-32 took a StringRef.
This patch changes it to ArrayRef<uint8_t> which I think is the best
choice, and simplifies a few of the callers nicely.

Differential revision: https://reviews.llvm.org/D68570

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374148 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-09 09:06:30 +00:00
..
COFFObjcopy.cpp Unify the two CRC implementations 2019-10-09 09:06:30 +00:00
COFFObjcopy.h [llvm-objcopy][NFC] More error propagation 2019-01-30 14:36:53 +00:00
Object.cpp [llvm-objcopy] Tidy up error messages 2019-05-22 13:23:26 +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/COFF.h] - Stop returning std::error_code in a few methods. NFCI. 2019-08-19 14:32:23 +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] Add support for --add-section for COFF 2019-07-26 17:06:41 +00:00
Writer.h [llvm-objcopy] [COFF] Fix handling of aux symbols for big objects 2019-01-23 11:54:51 +00:00