ckissane updated this revision to Diff 441770.
ckissane added a comment.
updated diff
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
} // End of namespace compression
Index: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -184,6 +184,7 @@
introduction of alternatives to zlib compression in the llvm toolchain.
Changes are as follows:
* Relocate the ``llvm::zlib`` namespace to ``llvm::compression::zlib``.
+ * Remove crc32 from zlib compression namespace, people should use the
``llvm::crc32`` instead.
Changes to the Go bindings
--------------------------
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
} // End of namespace compression
Index: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -184,6 +184,7 @@
introduction of alternatives to zlib compression in the llvm toolchain.
Changes are as follows:
* Relocate the ``llvm::zlib`` namespace to ``llvm::compression::zlib``.
+ * Remove crc32 from zlib compression namespace, people should use the ``llvm::crc32`` instead.
Changes to the Go bindings
--------------------------
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits