diff options
Diffstat (limited to 'lib/Support/Compression.cpp')
-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 |