[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:
Steven Wu
2025-04-23 13:45:55 -07:00
parent a3279afd08
commit 201e4faea7
11 changed files with 101 additions and 88 deletions

View File

@@ -630,11 +630,11 @@ bool CompilerInstance::setUpVirtualFileSystemOverlays() {
}
if (Invocation.getCASOptions().requireCASFS()) {
if (!CASOpts.CASFSRootIDs.empty() || !CASOpts.ClangIncludeTrees.empty() ||
if (!CASOpts.CASFSRootIDs.empty() || !CASOpts.ClangIncludeTree.empty() ||
!CASOpts.ClangIncludeTreeFileList.empty()) {
// Set up CASFS as BaseFS.
auto FS = createCASFileSystem(*CAS, CASOpts.CASFSRootIDs,
CASOpts.ClangIncludeTrees,
CASOpts.ClangIncludeTree,
CASOpts.ClangIncludeTreeFileList);
if (!FS) {
Diagnostics.diagnose(SourceLoc(), diag::error_cas_fs_creation,