Remove FileSpec::ReadFileContents.
This functionality is subsumed by DataBufferLLVM, which is
also more efficient since it will try to mmap. However, we
don't yet support mmaping writable private sections, and in
some cases we were using ReadFileContents and then modifying
the buffer. To address that I've added a flag to the
DataBufferLLVM methods that allow you to map privately, which
disables the mmaping path entirely. Eventually we should teach
DataBufferLLVM to use mmap with writable private, but that is
orthogonal to this effort.
Differential Revision: https://reviews.llvm.org/D30622
llvm-svn: 297095
diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
index 352e33b..f3f4664 100644
--- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -53,7 +53,7 @@
// Read enough data for the Minidump header
constexpr size_t header_size = sizeof(MinidumpHeader);
auto DataPtr =
- DataBufferLLVM::CreateFromPath(crash_file->GetPath(), header_size, 0);
+ DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(), header_size, 0);
if (!DataPtr)
return nullptr;
@@ -65,7 +65,7 @@
if (header == nullptr)
return nullptr;
- auto AllData = DataBufferLLVM::CreateFromPath(crash_file->GetPath(), -1, 0);
+ auto AllData = DataBufferLLVM::CreateSliceFromPath(crash_file->GetPath(), -1, 0);
if (!AllData)
return nullptr;