diff options
author | Pavel Labath <labath@google.com> | 2016-11-01 16:11:14 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-11-01 16:11:14 +0000 |
commit | 1408bf7231c22bce70fea5470a865955ee40399b (patch) | |
tree | 353d7fa675051c51596081e7a66d6a8efd027877 /lldb/source/Interpreter/OptionValueFileSpec.cpp | |
parent | b187f5d988e95197e4b8cfa2121ee13c292ad8bc (diff) | |
download | bcm5719-llvm-1408bf7231c22bce70fea5470a865955ee40399b.tar.gz bcm5719-llvm-1408bf7231c22bce70fea5470a865955ee40399b.zip |
Remove TimeValue usage from FileSpec.h
Summary:
The only usage there was in GetModificationTime(). I also took the opportunity
to move this function from FileSpec to the FileSystem class - since we are
using FileSpecs to also represent remote files for which we cannot (easily)
retrieve modification time, it makes sense to make the decision to get the
modification time more explicit.
The new function returns a llvm::sys::TimePoint<>. To aid the transition
from TimeValue, I have added a constructor to it which enables implicit
conversion from a time_point.
Reviewers: zturner, clayborg
Subscribers: mehdi_amini, tberghammer, danalbert, beanz, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D25392
llvm-svn: 285702
Diffstat (limited to 'lldb/source/Interpreter/OptionValueFileSpec.cpp')
-rw-r--r-- | lldb/source/Interpreter/OptionValueFileSpec.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/OptionValueFileSpec.cpp b/lldb/source/Interpreter/OptionValueFileSpec.cpp index 201181368bf..732bafe69be 100644 --- a/lldb/source/Interpreter/OptionValueFileSpec.cpp +++ b/lldb/source/Interpreter/OptionValueFileSpec.cpp @@ -9,12 +9,9 @@ #include "lldb/Interpreter/OptionValueFileSpec.h" -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes #include "lldb/Core/State.h" #include "lldb/DataFormatters/FormatManager.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Interpreter/Args.h" #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Interpreter/CommandInterpreter.h" @@ -120,7 +117,8 @@ size_t OptionValueFileSpec::AutoComplete(CommandInterpreter &interpreter, const lldb::DataBufferSP & OptionValueFileSpec::GetFileContents(bool null_terminate) { if (m_current_value) { - const TimeValue file_mod_time = m_current_value.GetModificationTime(); + const TimeValue file_mod_time = + FileSystem::GetModificationTime(m_current_value); if (m_data_sp && m_data_mod_time == file_mod_time) return m_data_sp; if (null_terminate) |