================ @@ -154,6 +154,20 @@ void ModuleDepCollector::addOutputPaths(CowCompilerInvocation &CI, } } +void dependencies::removeUnnecessaryDependencies(CompilerInvocation &CI, + bool ForModuleBuild) { + if (CI.getFrontendOpts().ProgramAction == frontend::GeneratePCH || + (ForModuleBuild && !CI.getLangOpts().ModulesCodegen)) { + CI.getCodeGenOpts().DebugCompilationDir.clear(); + CI.getCodeGenOpts().CoverageCompilationDir.clear(); + CI.getCodeGenOpts().CoverageDataFile.clear(); + CI.getCodeGenOpts().CoverageNotesFile.clear(); + CI.getCodeGenOpts().ProfileInstrumentUsePath.clear(); + CI.getCodeGenOpts().SampleProfileFile.clear(); + CI.getCodeGenOpts().ProfileRemappingFile.clear(); ---------------- akyrtzi wrote:
I had an offline discussion with Jan about how to better factor-out this piece of code. https://github.com/llvm/llvm-project/pull/88447 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits