Only modules that were built from preprocessed sources have PresumedModuleMapFile. Encode the optionality into the type system and avoid generating the -fmodule-map-file= arguments in such cases.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Marking "request changes" for clarity.
Since this drops -fmodule-map-file= arguments, I imagine you can add a test that demonstrates it. But if that's currently awkward to observe because you need another piece to land in a follow-up, I'm fine to delay testing until then.
I created D108647 to more directly/correctly address the issues I'm seeing at the moment in explicit builds.
I think dealing with the possibility of empty PresumedModuleMapFile is still valuable, but I'm not aware how to test this at the moment (create module from non-preprocessed sources).
I'm not sure it is possible, based it being filled in always in ASTReader.cpp. I think this changed in ab75597ddac52f24e9cbd794cded195262ef670e but the comment wasn't updated. I suggest adding an assert that the module map file is not empty.
clang-format not found in user’s local PATH; not linting file.