mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Caching] Reduce the number of cas ID passed on frontend commandline
Using IncludeTree::FileList to concat the include tree file systems that are passed on the command-line. This significantly reduce the command-line size, and also makes the cache key computation a lot faster. rdar://148752988
This commit is contained in:
@@ -64,9 +64,9 @@ static StringRef pluginModuleNameStringFromPath(StringRef path) {
|
||||
|
||||
static llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>
|
||||
getPluginLoadingFS(ASTContext &Ctx) {
|
||||
// If there is a clang include tree FS, using real file system to load plugin
|
||||
// If there is an immutable file system, using real file system to load plugin
|
||||
// as the FS in SourceMgr doesn't support directory iterator.
|
||||
if (Ctx.ClangImporterOpts.HasClangIncludeTreeRoot)
|
||||
if (Ctx.CASOpts.HasImmutableFileSystem)
|
||||
return llvm::vfs::getRealFileSystem();
|
||||
return Ctx.SourceMgr.getFileSystem();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user