Remove TimeValue usage from FileSpec.h
authorPavel Labath <labath@google.com>
Tue, 1 Nov 2016 16:11:14 +0000 (16:11 +0000)
committerPavel Labath <labath@google.com>
Tue, 1 Nov 2016 16:11:14 +0000 (16:11 +0000)
commit1408bf7231c22bce70fea5470a865955ee40399b
tree353d7fa675051c51596081e7a66d6a8efd027877
parentb187f5d988e95197e4b8cfa2121ee13c292ad8bc
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
20 files changed:
lldb/include/lldb/Core/Module.h
lldb/include/lldb/Core/ModuleSpec.h
lldb/include/lldb/Core/SourceManager.h
lldb/include/lldb/Host/FileSpec.h
lldb/include/lldb/Host/FileSystem.h
lldb/include/lldb/Host/TimeValue.h
lldb/include/lldb/Interpreter/OptionValueFileSpec.h
lldb/source/Core/Module.cpp
lldb/source/Core/ModuleList.cpp
lldb/source/Core/SourceManager.cpp
lldb/source/Host/common/FileSpec.cpp
lldb/source/Host/common/FileSystem.cpp
lldb/source/Interpreter/OptionValueFileSpec.cpp
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/source/Plugins/Platform/Android/AdbClient.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
lldb/unittests/Host/CMakeLists.txt
lldb/unittests/Host/FileSystemTest.cpp [new file with mode: 0644]