diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-08-14 16:03:29 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-08-14 16:03:29 +0000 |
commit | 6ede706d4611643cda28dd18abb9f874b3869951 (patch) | |
tree | 4ba624a9ec0a7ee79a5a70de150a6358b71067ca /llvm/lib/Support/Compression.cpp | |
parent | 16b934d624c6202029c5244994915f9965ffd4be (diff) | |
download | bcm5719-llvm-6ede706d4611643cda28dd18abb9f874b3869951.tar.gz bcm5719-llvm-6ede706d4611643cda28dd18abb9f874b3869951.zip |
Expose CRC-32 implementation from zlib
llvm-svn: 188380
Diffstat (limited to 'llvm/lib/Support/Compression.cpp')
-rw-r--r-- | llvm/lib/Support/Compression.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/Compression.cpp b/llvm/lib/Support/Compression.cpp index fd8a8743ea1..b5ddb7002ca 100644 --- a/llvm/lib/Support/Compression.cpp +++ b/llvm/lib/Support/Compression.cpp @@ -81,6 +81,10 @@ zlib::Status zlib::uncompress(StringRef InputBuffer, return Res; } +uint32_t zlib::crc32(StringRef Buffer) { + return ::crc32(0, (const Bytef *)Buffer.data(), Buffer.size()); +} + #else bool zlib::isAvailable() { return false; } zlib::Status zlib::compress(StringRef InputBuffer, @@ -93,5 +97,8 @@ zlib::Status zlib::uncompress(StringRef InputBuffer, size_t UncompressedSize) { return zlib::StatusUnsupported; } +uint32_t zlib::crc32(StringRef Buffer) { + llvm_unreachable("zlib::crc32 is unavailable"); +} #endif |