================
@@ -685,6 +685,13 @@ void ModuleDepCollectorPP::EndOfMainFile() {
   if (!MDC.ScanInstance.getPreprocessorOpts().ImplicitPCHInclude.empty())
     MDC.addFileDep(MDC.ScanInstance.getPreprocessorOpts().ImplicitPCHInclude);
 
+  if (Module *CurrentModule = PP.getCurrentModuleImplementation()) {
+    if (OptionalFileEntryRef CurrentModuleMap =
+            
PP.getHeaderSearchInfo().getModuleMap().getModuleMapFileForUniquing(
+                CurrentModule))
+      MDC.addFileDep(CurrentModuleMap->getName());
----------------
vsapsai wrote:

Have experimented with it a little bit and looks like having output paths (like 
now) and remappers (specifically VFS overlays) in file-deps is enough. With 
these clang can find which output path corresponds to an input path.

These are preliminary results, I'm going to implement a more appropriate 
solution in this direction and see how it works.

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

Reply via email to