[PATCH] D106876: Remove non-affecting module maps from PCM files.
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 12:52:33 PDT 2022
dexonsmith added a comment.
In D106876#3869247 <https://reviews.llvm.org/D106876#3869247>, @dexonsmith wrote:
> A further (more involved) approach would be to separate module maps into a separate SourceManager, so that their source locations don't affect other input files. Then only module map source locations would need to be translated during serialization. (Now that FileManager has the capability to remap file contents, I think the commit that merged the SourceManagers could be effectively reverted.)
Throwing another idea out there... As a sort of compromise to avoid changing serialization/deserialization too much, maybe a hybrid could make sense:
- During compilation, keep newly-found/discovered module maps in a separate SourceManager.
- Translate all serialized module map locations to the main SourceManager during serialization. Could do this up front (collected non-ignored module maps) or maybe even on-demand (need to translate this location so add it to the main source manager).
(Or something along these lines...)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106876/new/
https://reviews.llvm.org/D106876
More information about the cfe-commits
mailing list