HassanSajjad-302 wrote:

ping.

I changed a function that is used in IPC from
```cpp
void CompilerInstance::makeModuleAndDependenciesVisible(Module *Mod) {
  getASTReader()->makeModuleVisible(Mod, Module::AllVisible, EndLoc);
  getPreprocessor().makeModuleVisible(Mod, EndLoc);
  getSema().makeModuleVisible(Mod, EndLoc);
  for (auto *Import : Mod->Imports) {
    makeModuleAndDependenciesVisible(Import);
  }
}
```

to 

```cpp
void CompilerInstance::makeModuleAndDependenciesVisible(Module *Mod) {
  if (Mod->NameVisibility == Module::AllVisible)
    return;

  for (auto *Import : Mod->Imports)
    makeModuleAndDependenciesVisible(Import);

  getASTReader()->makeModuleVisible(Mod, Module::AllVisible, EndLoc);
  getPreprocessor().makeModuleVisible(Mod, EndLoc);
  getSema().makeModuleVisible(Mod, EndLoc);
}
```

Now, dependencies are made visible before the dependent and operation performed 
only if it was not done already.
Please check https://discourse.llvm.org/t/rfc-hmake-for-llvm/88997/25?u=hassan

@ChuanqiXu9 Please merge now.

https://github.com/llvm/llvm-project/pull/147682
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to