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 | ef7aefc53bf24214f489bf9e4100bcff45f7b12a (patch) | |
tree | c0cea3f882e2a1f4f1d084b69adcd66ab1a5addc /lib/Support | |
parent | 14a5c695a9a4dc773cfc37c0c4a847e0160e5396 (diff) | |
download | external_llvm-ef7aefc53bf24214f489bf9e4100bcff45f7b12a.zip external_llvm-ef7aefc53bf24214f489bf9e4100bcff45f7b12a.tar.gz external_llvm-ef7aefc53bf24214f489bf9e4100bcff45f7b12a.tar.bz2 |
Expose CRC-32 implementation from zlib
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Compression.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Support/Compression.cpp b/lib/Support/Compression.cpp index fd8a874..b5ddb70 100644 --- a/lib/Support/Compression.cpp +++ b/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 |