summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-20 18:42:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-20 18:42:04 +0000
commit29c17db6508eec1c7c9fb23f3ce863d5ed9bef0e (patch)
tree56cd6dbfb7949281db6828ba10c81c3a6c4fcf69 /include
parenta1694e578492c90c246e59ec861c1a34f8ad7b4d (diff)
downloadllvm-29c17db6508eec1c7c9fb23f3ce863d5ed9bef0e.tar.gz
llvm-29c17db6508eec1c7c9fb23f3ce863d5ed9bef0e.tar.bz2
llvm-29c17db6508eec1c7c9fb23f3ce863d5ed9bef0e.tar.xz
Add support for getting the last modification time from a file_status.
Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/FileSystem.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h
index 6b3b126ea0..c9ecc30efb 100644
--- a/include/llvm/Support/FileSystem.h
+++ b/include/llvm/Support/FileSystem.h
@@ -33,6 +33,7 @@
#include "llvm/ADT/Twine.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/TimeValue.h"
#include "llvm/Support/system_error.h"
#include <ctime>
#include <iterator>
@@ -151,6 +152,7 @@ class file_status
#if defined(LLVM_ON_UNIX)
dev_t fs_st_dev;
ino_t fs_st_ino;
+ time_t fs_st_mtime;
#elif defined (LLVM_ON_WIN32)
uint32_t LastWriteTimeHigh;
uint32_t LastWriteTimeLow;
@@ -177,6 +179,7 @@ public:
// setters
void type(file_type v) { Type = v; }
void permissions(perms p) { Perms = p; }
+ TimeValue getLastModificationTime();
};
/// file_magic - An "enum class" enumeration of file types based on magic (the first