From 167ca4ae7eef7d8b3539a1a711d53b09e3105099 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Tue, 17 Jan 2017 15:45:07 +0000 Subject: Recommit r292214 "[Support/Compression] - Change zlib API to return Error instead of custom status" No any changes, will follow up with D28807 commit containing APLi change for clang to fix build issues happened. Original commit message: [Support/Compression] - Change zlib API to return Error instead of custom status. Previously API returned custom enum values. Patch changes it to return Error with string description. That should help users to report errors in universal way. Differential revision: https://reviews.llvm.org/D28684 llvm-svn: 292226 --- llvm/lib/Object/Decompressor.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'llvm/lib/Object/Decompressor.cpp') diff --git a/llvm/lib/Object/Decompressor.cpp b/llvm/lib/Object/Decompressor.cpp index bca41fd9f48..0be602b1fc1 100644 --- a/llvm/lib/Object/Decompressor.cpp +++ b/llvm/lib/Object/Decompressor.cpp @@ -95,8 +95,5 @@ Error Decompressor::decompress(SmallString<32> &Out) { Error Decompressor::decompress(MutableArrayRef Buffer) { size_t Size = Buffer.size(); - zlib::Status Status = zlib::uncompress(SectionData, Buffer.data(), Size); - if (Status != zlib::StatusOK) - return createError("decompression failed"); - return Error::success(); + return zlib::uncompress(SectionData, Buffer.data(), Size); } -- cgit v1.2.3