diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Interpreter/OptionValueFileSpec.cpp | |
parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) |
Notes
Diffstat (limited to 'source/Interpreter/OptionValueFileSpec.cpp')
-rw-r--r-- | source/Interpreter/OptionValueFileSpec.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/Interpreter/OptionValueFileSpec.cpp b/source/Interpreter/OptionValueFileSpec.cpp index 2b93628679ce..735a7d86334d 100644 --- a/source/Interpreter/OptionValueFileSpec.cpp +++ b/source/Interpreter/OptionValueFileSpec.cpp @@ -9,13 +9,12 @@ #include "lldb/Interpreter/OptionValueFileSpec.h" -#include "lldb/Core/State.h" #include "lldb/DataFormatters/FormatManager.h" #include "lldb/Host/FileSystem.h" #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; using namespace lldb_private; @@ -75,7 +74,9 @@ Status OptionValueFileSpec::SetValueFromString(llvm::StringRef value, // or whitespace. value = value.trim("\"' \t"); m_value_was_set = true; - m_current_value.SetFile(value.str(), m_resolve, FileSpec::Style::native); + m_current_value.SetFile(value.str(), FileSpec::Style::native); + if (m_resolve) + FileSystem::Instance().Resolve(m_current_value); m_data_sp.reset(); m_data_mod_time = llvm::sys::TimePoint<>(); NotifyValueChanged(); @@ -109,10 +110,11 @@ size_t OptionValueFileSpec::AutoComplete(CommandInterpreter &interpreter, const lldb::DataBufferSP &OptionValueFileSpec::GetFileContents() { if (m_current_value) { - const auto file_mod_time = FileSystem::GetModificationTime(m_current_value); + 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; |