summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CRC.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Unify the two CRC implementationsHans Wennborg2019-10-091-41/+72
| | | | | | | | | | | | | | | | | | | | | 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
* Attempt to recommit r357901Eugene Leviant2019-04-081-0/+68
| | | | llvm-svn: 357905
* Reverting r357901 as fails to build on some of the buildbotsEugene Leviant2019-04-081-68/+0
| | | | llvm-svn: 357902
* [Support] Add zlib independent CRC32Eugene Leviant2019-04-081-0/+68
Differential revision: https://reviews.llvm.org/D59816 llvm-svn: 357901
OpenPOWER on IntegriCloud