[Lldb-commits] [lldb] r320816 - Fix 32-bit builds broken by 320813
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 15 06:39:13 PST 2017
Author: labath
Date: Fri Dec 15 06:39:12 2017
New Revision: 320816
URL: http://llvm.org/viewvc/llvm-project?rev=320816&view=rev
Log:
Fix 32-bit builds broken by 320813
cast to size_t to avoid narrowing error.
Modified:
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=320816&r1=320815&r2=320816&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Fri Dec 15 06:39:12 2017
@@ -3496,7 +3496,7 @@ size_t ObjectFileELF::ReadSectionData(Se
auto Decompressor = llvm::object::Decompressor::create(
section->GetName().GetStringRef(),
{reinterpret_cast<const char *>(section_data.GetDataStart()),
- section_data.GetByteSize()},
+ size_t(section_data.GetByteSize())},
GetByteOrder() == eByteOrderLittle, GetAddressByteSize() == 8);
if (!Decompressor) {
LLDB_LOG(log, "Unable to initialize decompressor for section {0}: {1}",
@@ -3507,7 +3507,7 @@ size_t ObjectFileELF::ReadSectionData(Se
std::make_shared<DataBufferHeap>(Decompressor->getDecompressedSize(), 0);
if (auto Error = Decompressor->decompress(
{reinterpret_cast<char *>(buffer_sp->GetBytes()),
- buffer_sp->GetByteSize()})) {
+ size_t(buffer_sp->GetByteSize())})) {
LLDB_LOG(log, "Decompression of section {0} failed: {1}",
section->GetName(), llvm::toString(std::move(Error)));
return result;
More information about the lldb-commits
mailing list