================ @@ -4687,6 +4699,15 @@ void ASTWriter::collectNonAffectingInputFiles() { NonAffectingFileIDAdjustments.push_back(FileIDAdjustment); NonAffectingOffsetAdjustments.push_back(OffsetAdjustment); + const bool IncludeVFSUsage = + PP->getHeaderSearchInfo().getHeaderSearchOpts().ModulesIncludeVFSUsage; + FileManager &FileMgr = PP->getFileManager(); + FileMgr.trackVFSUsage(true); ---------------- jansvoboda11 wrote:
The scope of tracking is fairly long. Instead of intertwining it with the logic for finding affecting files and constructing the offset adjustment table, I think it would be clearer to have a separate loop at the end of this function: ```c++ if (IncludeVFSUsage) for (unsigned I = 1; I != N; ++I) if (IsSLocAffecting[I]) { SrcMgr::FileInfo File = /*...*/; FileMgr.getVirtualFileSystem().exists( File.getContentCache().OrigEntry->getNameAsRequested()); } ``` https://github.com/llvm/llvm-project/pull/73734 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits