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/Core/ModuleList.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/Core/ModuleList.cpp')
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index a97be86fae1..e6e64900908 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -19,6 +19,7 @@ #include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" #include "lldb/Host/Symbols.h" #include "lldb/Symbol/ObjectFile.h" @@ -855,8 +856,8 @@ Error ModuleList::GetSharedModule(const ModuleSpec &module_spec, // If we didn't have a UUID in mind when looking for the object file, // then we should make sure the modification time hasn't changed! if (platform_module_spec.GetUUIDPtr() == nullptr) { - TimeValue file_spec_mod_time( - located_binary_modulespec.GetFileSpec().GetModificationTime()); + TimeValue file_spec_mod_time(FileSystem::GetModificationTime( + located_binary_modulespec.GetFileSpec())); if (file_spec_mod_time.IsValid()) { if (file_spec_mod_time != module_sp->GetModificationTime()) { if (old_module_sp_ptr) |