Fix build errors caused by rL373914.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Wei Mi
2019-10-07 16:45:47 +00:00
parent a86b37af73
commit d4aecc52fc
2 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -530,8 +530,9 @@ std::error_code SampleProfileReaderExtBinaryBase::decompressSection(
StringRef CompressedStrings(reinterpret_cast<const char *>(Data),
*CompressSize);
char *Buffer = Allocator.Allocate<char>(DecompressBufSize);
size_t UCSize = DecompressBufSize;
llvm::Error E =
zlib::uncompress(CompressedStrings, Buffer, DecompressBufSize);
zlib::uncompress(CompressedStrings, Buffer, UCSize);
if (E)
return sampleprof_error::uncompress_failed;
DecompressBuf = reinterpret_cast<const uint8_t *>(Buffer);