[llvm] [Offload] Have `doJITPostProcessing` accept multiple binaries (PR #148608)

Ross Brunton via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 14 04:40:45 PDT 2025


================
@@ -2131,9 +2132,11 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
     if (sys::fs::remove(LinkerOutputFilePath))
       return Plugin::error(ErrorCode::HOST_IO,
                            "failed to remove temporary output file for lld");
-    if (sys::fs::remove(LinkerInputFilePath))
-      return Plugin::error(ErrorCode::HOST_IO,
-                           "failed to remove temporary input file for lld");
+    for (auto &N : InputFilenames) {
+      if (sys::fs::remove(N))
+        return Plugin::error(ErrorCode::HOST_IO,
+                             "failed to remove temporary input file for lld");
----------------
RossBrunton wrote:

`TempFile` exists, but it operates on file descriptors rather than names. I don't think it's possible for a helper to exist that deletes the file in a destructor, since it could fail and it needs to send the error somewhere.

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


More information about the llvm-commits mailing list