[PATCH] D128754: Refactor LLVM compression namespaces (Part 1: remove crc32)
Cole Kissane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 30 15:23:40 PDT 2022
ckissane updated this revision to Diff 441541.
ckissane added a comment.
- Merge branch 'ckissane.refactor-compression.part-0' into ckissane.refactor-compression.part-1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128754/new/
https://reviews.llvm.org/D128754
Files:
llvm/docs/ReleaseNotes.rst
llvm/include/llvm/Support/Compression.h
llvm/lib/Support/Compression.cpp
llvm/unittests/Support/CompressionTest.cpp
Index: llvm/unittests/Support/CompressionTest.cpp
===================================================================
--- llvm/unittests/Support/CompressionTest.cpp
+++ llvm/unittests/Support/CompressionTest.cpp
@@ -64,12 +64,6 @@
TestZlibCompression(BinaryDataStr, zlib::DefaultCompression);
}
-TEST(CompressionTest, ZlibCRC32) {
- EXPECT_EQ(
- 0x414FA339U,
- zlib::crc32(StringRef("The quick brown fox jumps over the lazy dog")));
-}
-
#endif
}
Index: llvm/lib/Support/Compression.cpp
===================================================================
--- llvm/lib/Support/Compression.cpp
+++ llvm/lib/Support/Compression.cpp
@@ -84,10 +84,6 @@
return E;
}
-uint32_t zlib::crc32(StringRef Buffer) {
- return ::crc32(0, (const Bytef *)Buffer.data(), Buffer.size());
-}
-
#else
bool zlib::isAvailable() { return false; }
void zlib::compress(StringRef InputBuffer,
@@ -103,7 +99,4 @@
size_t UncompressedSize) {
llvm_unreachable("zlib::uncompress is unavailable");
}
-uint32_t zlib::crc32(StringRef Buffer) {
- llvm_unreachable("zlib::crc32 is unavailable");
-}
#endif
Index: llvm/include/llvm/Support/Compression.h
===================================================================
--- llvm/include/llvm/Support/Compression.h
+++ llvm/include/llvm/Support/Compression.h
@@ -42,8 +42,6 @@
SmallVectorImpl<char> &UncompressedBuffer,
size_t UncompressedSize);
-uint32_t crc32(StringRef Buffer);
-
} // End of namespace zlib
namespace profile = llvm::compression::zlib;
Index: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -187,6 +187,7 @@
* Code that explictly needs ``zlib`` compression (IE zlib elf debug sections) should use ``llvm::compression::zlib``.
* Code interfacing with compressed profile data should use ``llvm::compression::profile``.
* Code interfacing with compressed serialized data should use ``llvm::compression::serialize``.
+ * Remove crc32 from zlib compression namespace, people should use the ``llvm::crc32`` instead.
Changes to the Go bindings
--------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128754.441541.patch
Type: text/x-patch
Size: 2224 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220630/c5c9dd2f/attachment-0001.bin>
More information about the cfe-commits
mailing list