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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits