[clang] [Feature]: merge host and kernel dependencies for heterogeneous compilation (PR #119513)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 21 10:11:24 PST 2025


================
@@ -350,13 +353,105 @@ void DependencyFileGenerator::outputDependencyFile(DiagnosticsEngine &Diags) {
   }
 
   std::error_code EC;
-  llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_TextWithCRLF);
-  if (EC) {
-    Diags.Report(diag::err_fe_error_opening) << OutputFile << EC.message();
-    return;
-  }
 
-  outputDependencyFile(OS);
+  // merge host dependency file (*.d.host)
----------------
yxsamliu wrote:

Better refactor the code for merging dependency files as a static function 

https://github.com/llvm/llvm-project/pull/119513


More information about the cfe-commits mailing list