Skip to content

Commit ff63a90

Browse files
committed
[Dependency Scanning] Remove 'overlaySharedFilesystemCacheForCompilation' from the scanner. It overlays a non-thread-safe filesystem on shared compilation instances and is no longer valid with parallel scanning.
1 parent a7a0b32 commit ff63a90

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

include/swift/AST/ModuleDependencies.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,10 +915,6 @@ class SwiftDependencyScanningService {
915915
return Mapper->mapToString(Path);
916916
}
917917

918-
/// Wrap the filesystem on the specified `CompilerInstance` with a
919-
/// caching `DependencyScanningWorkerFilesystem`
920-
void overlaySharedFilesystemCacheForCompilation(CompilerInstance &Instance);
921-
922918
/// Setup caching service.
923919
bool setupCachingDependencyScanningService(CompilerInstance &Instance);
924920
private:

lib/AST/ModuleDependencies.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -480,17 +480,6 @@ SwiftDependencyTracker::createTreeFromDependencies() {
480480
});
481481
}
482482

483-
void SwiftDependencyScanningService::overlaySharedFilesystemCacheForCompilation(
484-
CompilerInstance &Instance) {
485-
auto existingFS = Instance.getSourceMgr().getFileSystem();
486-
llvm::IntrusiveRefCntPtr<
487-
clang::tooling::dependencies::DependencyScanningWorkerFilesystem>
488-
depFS =
489-
new clang::tooling::dependencies::DependencyScanningWorkerFilesystem(
490-
getSharedFilesystemCache(), existingFS);
491-
Instance.getSourceMgr().setFileSystem(depFS);
492-
}
493-
494483
bool SwiftDependencyScanningService::setupCachingDependencyScanningService(
495484
CompilerInstance &Instance) {
496485
if (!Instance.getInvocation().getFrontendOptions().EnableCaching)

lib/DependencyScan/ScanDependencies.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,8 +1448,6 @@ bool swift::dependencies::scanDependencies(CompilerInstance &instance) {
14481448
if (opts.ReuseDependencyScannerCache)
14491449
deserializeDependencyCache(instance, service);
14501450

1451-
// Wrap the filesystem with a caching `DependencyScanningWorkerFilesystem`
1452-
service.overlaySharedFilesystemCacheForCompilation(instance);
14531451
if (service.setupCachingDependencyScanningService(instance))
14541452
return true;
14551453

@@ -1520,7 +1518,6 @@ bool swift::dependencies::batchScanDependencies(
15201518
// we have created
15211519

15221520
SwiftDependencyScanningService singleUseService;
1523-
singleUseService.overlaySharedFilesystemCacheForCompilation(instance);
15241521
if (singleUseService.setupCachingDependencyScanningService(instance))
15251522
return true;
15261523

0 commit comments

Comments
 (0)