aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Compression.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-09-08 09:32:54 +0200
committerNikita Popov <npopov@redhat.com>2022-09-08 09:33:12 +0200
commit0444b40ed3392dd4a439912a0e8ab6db4e83fce0 (patch)
tree14abe080012551c49a176f54fd9790c16b0c36d0 /llvm/lib/Support/Compression.cpp
parent10842b44759f987777b08e7714ef77da2526473a (diff)
downloadllvm-0444b40ed3392dd4a439912a0e8ab6db4e83fce0.zip
llvm-0444b40ed3392dd4a439912a0e8ab6db4e83fce0.tar.gz
llvm-0444b40ed3392dd4a439912a0e8ab6db4e83fce0.tar.bz2
Revert "[Support] Add llvm::compression::{getReasonIfUnsupported,compress,decompress}"
This reverts commit 19dc3cff0f771bb8933136ef68e782553e920d04. This reverts commit 5b19a1f8e88da9ec92b995bfee90043795c2c252. This reverts commit 9397648ac8ad192f7e6e6a8e6894c27bf7e024e9. This reverts commit 10842b44759f987777b08e7714ef77da2526473a. Breaks the GCC build, as reported here: https://reviews.llvm.org/D130506#3776415
Diffstat (limited to 'llvm/lib/Support/Compression.cpp')
-rw-r--r--llvm/lib/Support/Compression.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/llvm/lib/Support/Compression.cpp b/llvm/lib/Support/Compression.cpp
index 2e0a2c5..e8fb715 100644
--- a/llvm/lib/Support/Compression.cpp
+++ b/llvm/lib/Support/Compression.cpp
@@ -27,50 +27,6 @@
using namespace llvm;
using namespace llvm::compression;
-const char *compression::getReasonIfUnsupported(compression::Format F) {
- switch (F) {
- case compression::Format::Zlib:
- if (zlib::isAvailable())
- return nullptr;
- return "LLVM was not built with LLVM_ENABLE_ZLIB or did not find zlib at "
- "build time";
- case compression::Format::Zstd:
- if (zstd::isAvailable())
- return nullptr;
- return "LLVM was not built with LLVM_ENABLE_ZSTD or did not find zstd at "
- "build time";
- }
-}
-
-void compression::compress(Params P, ArrayRef<uint8_t> Input,
- SmallVectorImpl<uint8_t> &Output) {
- switch (P.Format) {
- case compression::Format::Zlib:
- zlib::compress(Input, Output, P.Level);
- break;
- case compression::Format::Zstd:
- zstd::compress(Input, Output, P.Level);
- break;
- }
-}
-
-Error compression::decompress(compression::Format F, ArrayRef<uint8_t> Input,
- SmallVectorImpl<uint8_t> &Output,
- size_t UncompressedSize) {
- switch (F) {
- case compression::Format::Zlib:
- return zlib::uncompress(Input, Output, UncompressedSize);
- case compression::Format::Zstd:
- return zstd::uncompress(Input, Output, UncompressedSize);
- }
-}
-
-Error compression::decompress(DebugCompressionType T, ArrayRef<uint8_t> Input,
- SmallVectorImpl<uint8_t> &Output,
- size_t UncompressedSize) {
- return decompress(formatFor(T), Input, Output, UncompressedSize);
-}
-
#if LLVM_ENABLE_ZLIB
static StringRef convertZlibCodeToString(int Code) {