diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-12 21:24:50 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-12 21:24:50 +0000 |
| commit | 87e403aa4f62d7385999041abce5fdadb8741a47 (patch) | |
| tree | 50a1ddaec65b06269d32c1455915f0fd4340f41e /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | |
| parent | e565e5a9621de42e7b82ad50803fe03beafa0334 (diff) | |
| download | bcm5719-llvm-87e403aa4f62d7385999041abce5fdadb8741a47.tar.gz bcm5719-llvm-87e403aa4f62d7385999041abce5fdadb8741a47.zip | |
Re-land "Extract construction of DataBufferLLVM into FileSystem"
This fixes some UB in isLocal detected by the sanitized bot.
llvm-svn: 346707
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 76eedb8f153..95daadface6 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -36,7 +36,6 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/Args.h" #include "lldb/Utility/ConstString.h" -#include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/RegisterValue.h" #include "lldb/Utility/RegularExpression.h" @@ -2540,7 +2539,7 @@ bool RenderScriptRuntime::LoadAllocation(Stream &strm, const uint32_t alloc_id, } // Read file into data buffer - auto data_sp = DataBufferLLVM::CreateFromPath(file.GetPath()); + auto data_sp = FileSystem::Instance().CreateDataBuffer(file.GetPath()); // Cast start of buffer to FileHeader and use pointer to read metadata void *file_buf = data_sp->GetBytes(); @@ -3081,7 +3080,8 @@ bool RSModuleDescriptor::ParseRSInfo() { const addr_t size = info_sym->GetByteSize(); const FileSpec fs = m_module->GetFileSpec(); - auto buffer = DataBufferLLVM::CreateSliceFromPath(fs.GetPath(), size, addr); + auto buffer = + FileSystem::Instance().CreateDataBuffer(fs.GetPath(), size, addr); if (!buffer) return false; |

