[PATCH] D137989: [clang][deps] Avoid leaking modulemap paths across unrelated imports

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 15 11:18:44 PST 2022


benlangmuir updated this revision to Diff 475534.
benlangmuir added a comment.

- Removed outdated FIXME
- Ran clang-format
- Attempt to fix Windows test failure: the `StringSet` of paths was failing to match, so switch to `DenseSet<FileEntry *>`. Note: the path that ends up in the command-line is from a `FileEntryRef`, but the equality of `FileEntry *` is how we check whether to include it at all.  For now we just re-lookup the paths which should always hit the path cache in FIleManager. A future improvement could be to track FileEntryRef for the module map paths directly instead of strings.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137989/new/

https://reviews.llvm.org/D137989

Files:
  clang/include/clang/Serialization/ASTReader.h
  clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
  clang/lib/Frontend/FrontendAction.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
  clang/test/ClangScanDeps/modules-symlink-dir-from-module.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137989.475534.patch
Type: text/x-patch
Size: 11051 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221115/e1f9d059/attachment-0001.bin>


More information about the cfe-commits mailing list