summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionValueFileSpec.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-11-12 21:24:50 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-11-12 21:24:50 +0000
commit87e403aa4f62d7385999041abce5fdadb8741a47 (patch)
tree50a1ddaec65b06269d32c1455915f0fd4340f41e /lldb/source/Interpreter/OptionValueFileSpec.cpp
parente565e5a9621de42e7b82ad50803fe03beafa0334 (diff)
downloadbcm5719-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/Interpreter/OptionValueFileSpec.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueFileSpec.cpp4
1 files changed, 2 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud