jansvoboda11 wrote:
> Can you not just move the `err_module_rebuild_finalized` diagnostic into
> `compileModuleImpl`? It has access to everything it needs there.
I didn't want to do it there to avoid unnecessarily creating the
`CompilerInstance` when we're about to hit the error. But I tried moving the
diagnostic into `compileModuleImpl()` and it nicely allows for collapsing
`compileModule()` and `compileModuleImpl()` together, if we're fine with this
running for the `#pragma clang module build/endbuild` case too:
```c++
// We've rebuilt a module. If we're allowed to generate or update the global
// module index, record that fact in the importing compiler instance.
if (ImportingInstance.getFrontendOpts().GenerateGlobalModuleIndex) {
ImportingInstance.setBuildGlobalModuleIndex(true);
}
```
https://github.com/llvm/llvm-project/pull/134887
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits