[PATCH] D113676: [clang][lex] Fix search path usage remark with modules
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 6 08:49:07 PST 2022
jansvoboda11 marked an inline comment as done.
jansvoboda11 added a comment.
I'm starting to think it could be fine to keep doing things as outlined by this patch: only marking search paths that discovered a module as used when its `Module` gets returned from `HeaderSearch` (and ignoring `Module`s returned `ModuleMap`).
I think this could work okay for the purposes of dependency scanning.
If the scanning phase fails with an error, the diagnostics will be presented to the user and the actual compile won't be carried out at all - the pruning optimization won't kick in.
Other kinds of diagnostics (that might be discarded/changed by pruning search paths) will be still visible in the build log of the scanning phase - this might be good enough.
And the preprocessor seems to use `HeaderSearch` when handling include/import directives without touching `ModuleMap`, which should work.
If we document this properly in `computeUserEntryUsage()` I think that may be fine. Any thoughts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113676/new/
https://reviews.llvm.org/D113676
More information about the cfe-commits
mailing list