[PATCH] D87673: [clangd] Don't use zlib when it's unavailable.
Aleksandr Platonov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 15 01:24:02 PDT 2020
ArcsinX updated this revision to Diff 291827.
ArcsinX added a comment.
Fix build
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87673/new/
https://reviews.llvm.org/D87673
Files:
clang-tools-extra/clangd/index/Serialization.cpp
Index: clang-tools-extra/clangd/index/Serialization.cpp
===================================================================
--- clang-tools-extra/clangd/index/Serialization.cpp
+++ clang-tools-extra/clangd/index/Serialization.cpp
@@ -201,11 +201,13 @@
llvm::SmallString<1> UncompressedStorage;
if (UncompressedSize == 0) // No compression
Uncompressed = R.rest();
- else {
+ else if (llvm::zlib::isAvailable()) {
if (llvm::Error E = llvm::zlib::uncompress(R.rest(), UncompressedStorage,
UncompressedSize))
return std::move(E);
Uncompressed = UncompressedStorage;
+ } else {
+ return error("Compressed string table, but zlib is unavailable");
}
StringTableIn Table;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87673.291827.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200915/7ff3f8a5/attachment.bin>
More information about the cfe-commits
mailing list