================
@@ -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:

Let's take a step back. What use cases do you have for "file-deps"? Because 
I've realized that for reproducers I'm not interested in the _output paths_ to 
process them somehow. Actually, I want to take the paths and provide them to 
the compiler as the _input_.

I'm considering if we should have 2 flavours of file dependencies - one before 
all the file system remappings and one after clang applied the remappings.

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