summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-12-15 14:39:12 +0000
committerPavel Labath <labath@google.com>2017-12-15 14:39:12 +0000
commit4c2eb8b244b4703cb472f6dd85590002cece0879 (patch)
tree60a2132d03600b87ab5734f9a4681b9aeed78e2d /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parent5009a1c7383a3900c2d26bec3da785ae8d9169d1 (diff)
downloadbcm5719-llvm-4c2eb8b244b4703cb472f6dd85590002cece0879.tar.gz
bcm5719-llvm-4c2eb8b244b4703cb472f6dd85590002cece0879.zip
Fix 32-bit builds broken by 320813
cast to size_t to avoid narrowing error. llvm-svn: 320816
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 9869a94f06b..17d892450e4 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -3496,7 +3496,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
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(Section *section,
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;
OpenPOWER on IntegriCloud