forked from OSchip/llvm-project
parent
7e38f0c408
commit
283df8cf74
|
@ -202,10 +202,10 @@ public:
|
|||
|
||||
private:
|
||||
virtual void initSectionLayout() override {
|
||||
SectionLayout = {{SecProfSummary},
|
||||
{SecNameTable},
|
||||
{SecLBRProfile},
|
||||
{SecProfileSymbolList}};
|
||||
SectionLayout = {{SecProfSummary, 0, 0, 0},
|
||||
{SecNameTable, 0, 0, 0},
|
||||
{SecLBRProfile, 0, 0, 0},
|
||||
{SecProfileSymbolList, 0, 0, 0}};
|
||||
};
|
||||
virtual std::error_code
|
||||
writeSections(const StringMap<FunctionSamples> &ProfileMap) override;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue