[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 3 13:12:13 PDT 2025
jansvoboda11 wrote:
> > This now makes much more sense after the renames from the prep-commit. There are still some naming inconsistencies, though. For example `ModuleMap::loadModuleMapFile()` both **parses** and loads a module map file, but `ModuleMap::findOrLoadModule()` expects the module map file to be already parsed and only loads the module. I think there's value in making this distinction more explicit. Maybe we could say that loading a module/module map file consists of parsing and _materializing_? No we can consistently name functions that do one, the other, or both.
>
> I don't think I want all 3 concepts as that's more mental complexity without much benefit. I view it as `loadModuleMapFile` takes a path and thus necessarily parses before loading. Could call it `parseAndLoadModuleMapFile`, but that's pretty long.
I prefer all 3 concepts because they result in terse function names. But if you're opposed, `parseAndLoadModuleMapFile()` is still much better than the current name IMO. 👍
https://github.com/llvm/llvm-project/pull/132853
More information about the cfe-commits
mailing list