aboutsummaryrefslogtreecommitdiff
path: root/lldb
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-07-13 16:26:54 -0700
committerFangrui Song <i@maskray.me>2022-07-13 16:26:54 -0700
commite690137dde1c9b037e0c987d393da054d86eeeab (patch)
tree5d5a58b92026eb8cf6a344af40bc05eaddc1344d /lldb
parent[SimplifyCFG] Improve SwitchToLookupTable optimization (diff)
downloadllvm-project-e690137dde1c9b037e0c987d393da054d86eeeab.tar.gz
llvm-project-e690137dde1c9b037e0c987d393da054d86eeeab.tar.bz2
llvm-project-e690137dde1c9b037e0c987d393da054d86eeeab.zip
[Support] Change compression::zlib::{compress,uncompress} to use uint8_t *
It's more natural to use uint8_t * (std::byte needs C++17 and llvm has too much uint8_t *) and most callers use uint8_t * instead of char *. The functions are recently moved into `llvm::compression::zlib::`, so downstream projects need to make adaption anyway.
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 28ccfbe3d6e6..f9fb36890d5a 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -3386,8 +3386,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
auto buffer_sp =
std::make_shared<DataBufferHeap>(Decompressor->getDecompressedSize(), 0);
if (auto error = Decompressor->decompress(
- {reinterpret_cast<char *>(buffer_sp->GetBytes()),
- size_t(buffer_sp->GetByteSize())})) {
+ {buffer_sp->GetBytes(), size_t(buffer_sp->GetByteSize())})) {
GetModule()->ReportWarning(
"Decompression of section '%s' failed: %s",
section->GetName().GetCString(),