================ @@ -149,11 +149,16 @@ std::vector<bool> HeaderSearch::collectVFSUsageAndClear() const { llvm::vfs::FileSystem &RootFS = FileMgr.getVirtualFileSystem(); // TODO: This only works if the `RedirectingFileSystem`s were all created by - // `createVFSFromOverlayFiles`. + // `createVFSFromOverlayFiles`. But at least exclude the ones with null + // OverlayFileDir. RootFS.visit([&](llvm::vfs::FileSystem &FS) { if (auto *RFS = dyn_cast<llvm::vfs::RedirectingFileSystem>(&FS)) { - VFSUsage.push_back(RFS->hasBeenUsed()); - RFS->clearHasBeenUsed(); + // Skip a `RedirectingFileSystem` with null OverlayFileDir which indicates + // that they aren't created by `createVFSFromOverlayFiles`. ---------------- hjyamauchi wrote:
Done https://github.com/llvm/llvm-project/pull/128267 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits