1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/tools/llvm-objcopy
Hans Wennborg 70269b4845 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

llvm-svn: 374148
2019-10-09 09:06:30 +00:00
..
COFF Unify the two CRC implementations 2019-10-09 09:06:30 +00:00
ELF [llvm-objcopy] Add --set-section-alignment 2019-10-02 12:41:25 +00:00
MachO [llvm-objcopy] Add --set-section-alignment 2019-10-02 12:41:25 +00:00
Buffer.cpp [llvm-objcopy][NFC] Remove unnecessary llvm-objcopy.h #includes 2019-03-13 23:40:16 +00:00
Buffer.h [llvm-objcopy] Fix crash when writing empty binary output 2019-01-28 15:02:40 +00:00
CMakeLists.txt [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC. 2019-09-24 09:38:23 +00:00
CommonOpts.td [llvm-objcopy] Move duplicate tablegen from objcopy and strip into one file 2019-08-15 04:45:41 +00:00
CopyConfig.cpp Unify the two CRC implementations 2019-10-09 09:06:30 +00:00
CopyConfig.h [llvm-objcopy] Add --set-section-alignment 2019-10-02 12:41:25 +00:00
llvm-objcopy.cpp [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC. 2019-09-24 09:38:23 +00:00
llvm-objcopy.h Small refactoring of FileError. NFC. 2019-02-11 09:49:37 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjcopyOpts.td [llvm-objcopy] Add --set-section-alignment 2019-10-02 12:41:25 +00:00
StripOpts.td [llvm-objcopy] Move duplicate tablegen from objcopy and strip into one file 2019-08-15 04:45:41 +00:00