diff options
Diffstat (limited to 'llvm/lib/ProfileData/SampleProf.cpp')
-rw-r--r-- | llvm/lib/ProfileData/SampleProf.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ProfileData/SampleProf.cpp b/llvm/lib/ProfileData/SampleProf.cpp index 36c39c12432..e94848df24e 100644 --- a/llvm/lib/ProfileData/SampleProf.cpp +++ b/llvm/lib/ProfileData/SampleProf.cpp @@ -211,7 +211,8 @@ std::error_code ProfileSymbolList::read(uint64_t CompressSize, StringRef CompressedStrings(reinterpret_cast<const char *>(Data), CompressSize); char *Buffer = Allocator.Allocate<char>(UncompressSize); - llvm::Error E = zlib::uncompress(CompressedStrings, Buffer, UncompressSize); + size_t UCSize = UncompressSize; + llvm::Error E = zlib::uncompress(CompressedStrings, Buffer, UCSize); if (E) return sampleprof_error::uncompress_failed; ListStart = Buffer; |