[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

Michael Spencer via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 3 13:06:38 PDT 2025


Bigcheese 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. 

https://github.com/llvm/llvm-project/pull/132853


More information about the cfe-commits mailing list