@@ -28,7 +28,7 @@ TEST(DependencyScanningWorkerFilesystem, CacheStatusFailures) {
2828 clang::CASOptions (), nullptr , nullptr , nullptr ,
2929 ScanningOptimizations::Default, /* EagerLoadModules=*/ false ,
3030 /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()),
31- true );
31+ /* CacheNegativeStats= */ true );
3232 DependencyScanningWorkerFilesystem DepFS (Service, InstrumentingFS);
3333 DependencyScanningWorkerFilesystem DepFS2 (Service, InstrumentingFS);
3434
@@ -59,7 +59,7 @@ TEST(DependencyScanningFilesystem, CacheGetRealPath) {
5959 clang::CASOptions (), nullptr , nullptr , nullptr ,
6060 ScanningOptimizations::Default, /* EagerLoadModules=*/ false ,
6161 /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()),
62- true );
62+ /* CacheNegativeStats= */ true );
6363 DependencyScanningWorkerFilesystem DepFS (Service, InstrumentingFS);
6464 DependencyScanningWorkerFilesystem DepFS2 (Service, InstrumentingFS);
6565
@@ -98,8 +98,7 @@ TEST(DependencyScanningFilesystem, RealPathAndStatusInvariants) {
9898 ScanningMode::DependencyDirectivesScan, ScanningOutputFormat::Make,
9999 clang::CASOptions (), nullptr , nullptr , nullptr ,
100100 ScanningOptimizations::Default, /* EagerLoadModules=*/ false ,
101- /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()),
102- true );
101+ /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()));
103102 DependencyScanningWorkerFilesystem DepFS (Service, InMemoryFS);
104103
105104 // Success.
@@ -157,7 +156,7 @@ TEST(DependencyScanningFilesystem, CacheStatOnExists) {
157156 clang::CASOptions (), nullptr , nullptr , nullptr ,
158157 ScanningOptimizations::Default, /* EagerLoadModules=*/ false ,
159158 /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()),
160- true );
159+ /* CacheNegativeStats= */ true );
161160 DependencyScanningWorkerFilesystem DepFS (Service, InstrumentingFS);
162161
163162 DepFS.status (" /foo" );
@@ -185,7 +184,7 @@ TEST(DependencyScanningFilesystem, CacheStatFailures) {
185184 clang::CASOptions (), nullptr , nullptr , nullptr ,
186185 ScanningOptimizations::Default, /* EagerLoadModules=*/ false ,
187186 /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()),
188- true );
187+ /* CacheNegativeStats= */ true );
189188 DependencyScanningWorkerFilesystem DepFS (Service, InstrumentingFS);
190189
191190 DepFS.status (" /dir" );
@@ -217,7 +216,7 @@ TEST(DependencyScanningFilesystem, DiagnoseStaleStatFailures) {
217216 clang::CASOptions (), nullptr , nullptr , nullptr ,
218217 ScanningOptimizations::Default, /* EagerLoadModules=*/ false ,
219218 /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()),
220- true );
219+ /* CacheNegativeStats= */ true );
221220 DependencyScanningWorkerFilesystem DepFS (Service, InMemoryFS);
222221
223222 bool Path1Exists = DepFS.exists (" /path1.suffix" );
@@ -248,7 +247,7 @@ TEST(DependencyScanningFilesystem, DiagnoseCachedFileSizeChange) {
248247 clang::CASOptions (), nullptr , nullptr , nullptr ,
249248 ScanningOptimizations::Default, /* EagerLoadModules=*/ false ,
250249 /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()),
251- true );
250+ /* CacheNegativeStats= */ true );
252251 DependencyScanningWorkerFilesystem DepFS (Service, InMemoryFS1);
253252
254253 InMemoryFS1->addFile (" /path1.suffix" , 0 ,
@@ -282,8 +281,12 @@ TEST(DependencyScanningFilesystem, DoNotDiagnoseDirSizeChange) {
282281 llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS =
283282 llvm::vfs::createPhysicalFileSystem ();
284283
285- DependencyScanningFilesystemSharedCache SharedCache;
286- DependencyScanningWorkerFilesystem DepFS (SharedCache, FS);
284+ DependencyScanningService Service (
285+ ScanningMode::DependencyDirectivesScan, ScanningOutputFormat::Make,
286+ clang::CASOptions (), nullptr , nullptr , nullptr ,
287+ ScanningOptimizations::Default, /* EagerLoadModules=*/ false ,
288+ /* TraceVFS=*/ false , llvm::sys::toTimeT (std::chrono::system_clock::now ()));
289+ DependencyScanningWorkerFilesystem DepFS (Service, FS);
287290
288291 // Trigger the file system cache.
289292 ASSERT_EQ (DepFS.exists (Dir), true );
@@ -302,6 +305,6 @@ TEST(DependencyScanningFilesystem, DoNotDiagnoseDirSizeChange) {
302305 }
303306
304307 // We do not report directory size changes.
305- auto InvalidEntries = SharedCache .getOutOfDateEntries (*FS);
308+ auto InvalidEntries = Service. getSharedCache () .getOutOfDateEntries (*FS);
306309 EXPECT_EQ (InvalidEntries.size (), 0u );
307310}
0 commit comments