1212#include " clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h"
1313#include " clang/Tooling/DependencyScanning/InProcessModuleCache.h"
1414#include " llvm/ADT/BitmaskEnum.h"
15+ #include " llvm/Support/Chrono.h"
1516
1617namespace clang {
1718namespace tooling {
@@ -84,7 +85,9 @@ class DependencyScanningService {
8485 DependencyScanningService (
8586 ScanningMode Mode, ScanningOutputFormat Format,
8687 ScanningOptimizations OptimizeArgs = ScanningOptimizations::Default,
87- bool EagerLoadModules = false , bool TraceVFS = false );
88+ bool EagerLoadModules = false , bool TraceVFS = false ,
89+ std::time_t BuildSessionTimestamp =
90+ llvm::sys::toTimeT (std::chrono::system_clock::now()));
8891
8992 ScanningMode getMode () const { return Mode; }
9093
@@ -100,7 +103,9 @@ class DependencyScanningService {
100103 return SharedCache;
101104 }
102105
103- ModuleCacheMutexes &getModuleCacheMutexes () { return ModCacheMutexes; }
106+ ModuleCacheEntries &getModuleCacheEntries () { return ModCacheEntries; }
107+
108+ std::time_t getBuildSessionTimestamp () const { return BuildSessionTimestamp; }
104109
105110private:
106111 const ScanningMode Mode;
@@ -113,8 +118,10 @@ class DependencyScanningService {
113118 const bool TraceVFS;
114119 // / The global file system cache.
115120 DependencyScanningFilesystemSharedCache SharedCache;
116- // / The global module cache mutexes.
117- ModuleCacheMutexes ModCacheMutexes;
121+ // / The global module cache entries.
122+ ModuleCacheEntries ModCacheEntries;
123+ // / The build session timestamp.
124+ std::time_t BuildSessionTimestamp;
118125};
119126
120127} // end namespace dependencies
0 commit comments