From 87e403aa4f62d7385999041abce5fdadb8741a47 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Mon, 12 Nov 2018 21:24:50 +0000 Subject: Re-land "Extract construction of DataBufferLLVM into FileSystem" This fixes some UB in isLocal detected by the sanitized bot. llvm-svn: 346707 --- lldb/source/Interpreter/OptionValueFileSpec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Interpreter/OptionValueFileSpec.cpp') diff --git a/lldb/source/Interpreter/OptionValueFileSpec.cpp b/lldb/source/Interpreter/OptionValueFileSpec.cpp index 92b49002387..735a7d86334 100644 --- a/lldb/source/Interpreter/OptionValueFileSpec.cpp +++ b/lldb/source/Interpreter/OptionValueFileSpec.cpp @@ -14,7 +14,6 @@ #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Utility/Args.h" -#include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/State.h" using namespace lldb; @@ -114,7 +113,8 @@ const lldb::DataBufferSP &OptionValueFileSpec::GetFileContents() { const auto file_mod_time = FileSystem::Instance().GetModificationTime(m_current_value); if (m_data_sp && m_data_mod_time == file_mod_time) return m_data_sp; - m_data_sp = DataBufferLLVM::CreateFromPath(m_current_value.GetPath()); + m_data_sp = + FileSystem::Instance().CreateDataBuffer(m_current_value.GetPath()); m_data_mod_time = file_mod_time; } return m_data_sp; -- cgit v1.2.3