summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectContainer
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-11-01 16:11:14 +0000
committerPavel Labath <labath@google.com>2016-11-01 16:11:14 +0000
commit1408bf7231c22bce70fea5470a865955ee40399b (patch)
tree353d7fa675051c51596081e7a66d6a8efd027877 /lldb/source/Plugins/ObjectContainer
parentb187f5d988e95197e4b8cfa2121ee13c292ad8bc (diff)
downloadbcm5719-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/Plugins/ObjectContainer')
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
index 90213ba4ae4..18f93160647 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
@@ -34,6 +34,7 @@ typedef struct ar_hdr {
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/Timer.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Symbol/ObjectFile.h"
using namespace lldb;
@@ -452,7 +453,7 @@ size_t ObjectContainerBSDArchive::GetModuleSpecifications(
data.SetData(data_sp, data_offset, data_sp->GetByteSize());
if (file && data_sp && ObjectContainerBSDArchive::MagicBytesMatch(data)) {
const size_t initial_count = specs.GetSize();
- TimeValue file_mod_time = file.GetModificationTime();
+ TimeValue file_mod_time = FileSystem::GetModificationTime(file);
Archive::shared_ptr archive_sp(Archive::FindCachedArchive(
file, ArchSpec(), file_mod_time, file_offset));
bool set_archive_arch = false;
OpenPOWER on IntegriCloud