forked from OSchip/llvm-project
Fix 32-bit builds broken by 320813
cast to size_t to avoid narrowing error. llvm-svn: 320816
This commit is contained in:
parent
5009a1c738
commit
4c2eb8b244
|
@ -3496,7 +3496,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
|
||||||
auto Decompressor = llvm::object::Decompressor::create(
|
auto Decompressor = llvm::object::Decompressor::create(
|
||||||
section->GetName().GetStringRef(),
|
section->GetName().GetStringRef(),
|
||||||
{reinterpret_cast<const char *>(section_data.GetDataStart()),
|
{reinterpret_cast<const char *>(section_data.GetDataStart()),
|
||||||
section_data.GetByteSize()},
|
size_t(section_data.GetByteSize())},
|
||||||
GetByteOrder() == eByteOrderLittle, GetAddressByteSize() == 8);
|
GetByteOrder() == eByteOrderLittle, GetAddressByteSize() == 8);
|
||||||
if (!Decompressor) {
|
if (!Decompressor) {
|
||||||
LLDB_LOG(log, "Unable to initialize decompressor for section {0}: {1}",
|
LLDB_LOG(log, "Unable to initialize decompressor for section {0}: {1}",
|
||||||
|
@ -3507,7 +3507,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
|
||||||
std::make_shared<DataBufferHeap>(Decompressor->getDecompressedSize(), 0);
|
std::make_shared<DataBufferHeap>(Decompressor->getDecompressedSize(), 0);
|
||||||
if (auto Error = Decompressor->decompress(
|
if (auto Error = Decompressor->decompress(
|
||||||
{reinterpret_cast<char *>(buffer_sp->GetBytes()),
|
{reinterpret_cast<char *>(buffer_sp->GetBytes()),
|
||||||
buffer_sp->GetByteSize()})) {
|
size_t(buffer_sp->GetByteSize())})) {
|
||||||
LLDB_LOG(log, "Decompression of section {0} failed: {1}",
|
LLDB_LOG(log, "Decompression of section {0} failed: {1}",
|
||||||
section->GetName(), llvm::toString(std::move(Error)));
|
section->GetName(), llvm::toString(std::move(Error)));
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue