https://github.com/adurang updated 
https://github.com/llvm/llvm-project/pull/185413

>From 0cbafd367321c547ad673c66fabcacbca629e039 Mon Sep 17 00:00:00 2001
From: "Duran, Alex" <[email protected]>
Date: Mon, 9 Mar 2026 06:05:50 -0700
Subject: [PATCH 1/6] [llvm][offload] Change Intel's SPIRV containerizetion
 from ELF to OffloadBinary

---
 .../clang-linker-wrapper-spirv-elf.cpp        |  22 ----
 .../llvm/Frontend/Offloading/Utility.h        |  27 ++++-
 llvm/lib/Frontend/Offloading/Utility.cpp      | 114 ++++++------------
 3 files changed, 59 insertions(+), 104 deletions(-)
 delete mode 100644 clang/test/Tooling/clang-linker-wrapper-spirv-elf.cpp

diff --git a/clang/test/Tooling/clang-linker-wrapper-spirv-elf.cpp 
b/clang/test/Tooling/clang-linker-wrapper-spirv-elf.cpp
deleted file mode 100644
index 8a7d36d36b025..0000000000000
--- a/clang/test/Tooling/clang-linker-wrapper-spirv-elf.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Verify the ELF packaging of OpenMP SPIR-V device images.
-// REQUIRES: system-linux
-// REQUIRES: spirv-tools
-// REQUIRES: spirv-registered-target
-// RUN: mkdir -p %t_tmp
-// RUN: cd %t_tmp
-// RUN: %clangxx -fopenmp -fopenmp-targets=spirv64-intel -nogpulib -c -o 
%t_clang-linker-wrapper-spirv-elf.o %s
-// RUN: not clang-linker-wrapper -o a.out %t_clang-linker-wrapper-spirv-elf.o 
--save-temps --linker-path=ld
-// RUN: llvm-offload-binary 
--image=triple=spirv64-intel,kind=openmp,file=%t.elf  
%t_tmp/a.out.openmp.image.wrapper.o
-// RUN: llvm-readelf -h %t.elf | FileCheck -check-prefix=CHECK-MACHINE %s
-// RUN: llvm-readelf -t %t.elf | FileCheck -check-prefix=CHECK-SECTION %s
-// RUN: llvm-readelf -n %t.elf | FileCheck -check-prefix=CHECK-NOTES %s
-
-// CHECK-MACHINE: Machine: Intel Graphics Technology
-
-// CHECK-SECTION: .note.inteloneompoffload
-// CHECK-SECTION: __openmp_offload_spirv_0
-
-// CHECK-NOTES-COUNT-3: INTELONEOMPOFFLOAD
-int main(int argc, char** argv) {
-  return 0;
-}
diff --git a/llvm/include/llvm/Frontend/Offloading/Utility.h 
b/llvm/include/llvm/Frontend/Offloading/Utility.h
index 23e6702beb476..0c2e5e7c860e3 100644
--- a/llvm/include/llvm/Frontend/Offloading/Utility.h
+++ b/llvm/include/llvm/Frontend/Offloading/Utility.h
@@ -158,10 +158,29 @@ LLVM_ABI Error getAMDGPUMetaDataFromImage(
 } // namespace amdgpu
 
 namespace intel {
-/// Containerizes an offloading binary into the ELF binary format expected by
-/// the Intel runtime offload plugin.
-LLVM_ABI Error
-containerizeOpenMPSPIRVImage(std::unique_ptr<MemoryBuffer> &Binary);
+/// Containerizes an SPIR-V image into inner OffloadBinary format.
+/// Creates a nested OffloadBinary structure where the inner binary contains
+/// the raw SPIR-V and associated metadata (version, format, triple, etc.).
+/// This inner OffloadBinary is then embedded in an outer OffloadBinary.
+///
+/// \param Binary The SPIR-V binary to containerize
+/// \param CompileOpts Optional compilation options
+/// \param LinkOpts Optional linking options
+LLVM_ABI Error containerizeSPIRVImage(std::unique_ptr<MemoryBuffer> &Binary,
+                                      object::OffloadKind Kind,
+                                      StringRef CompileOpts = "",
+                                      StringRef LinkOpts = "");
+
+/// Containerizes OpenMP SPIR-V image into inner OffloadBinary format.
+/// \param Binary The SPIR-V binary to containerize
+/// \param CompileOpts Optional compilation options
+/// \param LinkOpts Optional linking options
+inline LLVM_ABI Error containerizeOpenMPSPIRVImage(
+    std::unique_ptr<MemoryBuffer> &Binary, StringRef CompileOpts = "",
+    StringRef LinkOpts = "") {
+  return containerizeSPIRVImage(Binary, object::OffloadKind::OFK_OpenMP,
+                                CompileOpts, LinkOpts);
+}
 } // namespace intel
 } // namespace offloading
 } // namespace llvm
diff --git a/llvm/lib/Frontend/Offloading/Utility.cpp 
b/llvm/lib/Frontend/Offloading/Utility.cpp
index 5000488a52f37..d5571a15baf1c 100644
--- a/llvm/lib/Frontend/Offloading/Utility.cpp
+++ b/llvm/lib/Frontend/Offloading/Utility.cpp
@@ -15,6 +15,7 @@
 #include "llvm/IR/GlobalVariable.h"
 #include "llvm/IR/Value.h"
 #include "llvm/Object/ELFObjectFile.h"
+#include "llvm/Object/OffloadBinary.h"
 #include "llvm/ObjectYAML/ELFYAML.h"
 #include "llvm/ObjectYAML/yaml2obj.h"
 #include "llvm/Support/MemoryBufferRef.h"
@@ -377,84 +378,41 @@ Error 
llvm::offloading::amdgpu::getAMDGPUMetaDataFromImage(
   }
   return Error::success();
 }
-Error offloading::intel::containerizeOpenMPSPIRVImage(
-    std::unique_ptr<MemoryBuffer> &Img) {
-  constexpr char INTEL_ONEOMP_OFFLOAD_VERSION[] = "1.0";
-  constexpr int NT_INTEL_ONEOMP_OFFLOAD_VERSION = 1;
-  constexpr int NT_INTEL_ONEOMP_OFFLOAD_IMAGE_COUNT = 2;
-  constexpr int NT_INTEL_ONEOMP_OFFLOAD_IMAGE_AUX = 3;
-
-  // Start creating notes for the ELF container.
-  std::vector<ELFYAML::NoteEntry> Notes;
-  std::string Version = toHex(INTEL_ONEOMP_OFFLOAD_VERSION);
-  Notes.emplace_back(ELFYAML::NoteEntry{"INTELONEOMPOFFLOAD",
-                                        yaml::BinaryRef(Version),
-                                        NT_INTEL_ONEOMP_OFFLOAD_VERSION});
-
-  // The AuxInfo string will hold auxiliary information for the image.
-  // ELFYAML::NoteEntry structures will hold references to the
-  // string, so we have to make sure the string is valid.
-  std::string AuxInfo;
-
-  // TODO: Pass compile/link opts
-  StringRef CompileOpts = "";
-  StringRef LinkOpts = "";
-
-  unsigned ImageFmt = 1; // SPIR-V format
-
-  AuxInfo = toHex((Twine(0) + Twine('\0') + Twine(ImageFmt) + Twine('\0') +
-                   CompileOpts + Twine('\0') + LinkOpts)
-                      .str());
-  Notes.emplace_back(ELFYAML::NoteEntry{"INTELONEOMPOFFLOAD",
-                                        yaml::BinaryRef(AuxInfo),
-                                        NT_INTEL_ONEOMP_OFFLOAD_IMAGE_AUX});
-
-  std::string ImgCount = toHex(Twine(1).str()); // always one image per ELF
-  Notes.emplace_back(ELFYAML::NoteEntry{"INTELONEOMPOFFLOAD",
-                                        yaml::BinaryRef(ImgCount),
-                                        NT_INTEL_ONEOMP_OFFLOAD_IMAGE_COUNT});
-
-  std::string YamlFile;
-  llvm::raw_string_ostream YamlFileStream(YamlFile);
-
-  // Write the YAML template file.
-
-  // We use 64-bit little-endian ELF currently.
-  ELFYAML::FileHeader Header{};
-  Header.Class = ELF::ELFCLASS64;
-  Header.Data = ELF::ELFDATA2LSB;
-  Header.Type = ELF::ET_DYN;
-  Header.Machine = ELF::EM_INTELGT;
-
-  // Create a section with notes.
-  ELFYAML::NoteSection Section{};
-  Section.Type = ELF::SHT_NOTE;
-  Section.AddressAlign = 0;
-  Section.Name = ".note.inteloneompoffload";
-  Section.Notes.emplace(std::move(Notes));
-
-  ELFYAML::Object Object{};
-  Object.Header = Header;
-  Object.Chunks.push_back(
-      std::make_unique<ELFYAML::NoteSection>(std::move(Section)));
-
-  // Create the section that will hold the image
-  ELFYAML::RawContentSection ImageSection{};
-  ImageSection.Type = ELF::SHT_PROGBITS;
-  ImageSection.AddressAlign = 0;
-  std::string Name = "__openmp_offload_spirv_0";
-  ImageSection.Name = Name;
-  ImageSection.Content =
-      llvm::yaml::BinaryRef(arrayRefFromStringRef(Img->getBuffer()));
-  Object.Chunks.push_back(
-      std::make_unique<ELFYAML::RawContentSection>(std::move(ImageSection)));
-  Error Err = Error::success();
-  llvm::yaml::yaml2elf(
-      Object, YamlFileStream,
-      [&Err](const Twine &Msg) { Err = createStringError(Msg); }, UINT64_MAX);
-  if (Err)
-    return Err;
+Error offloading::intel::containerizeSPIRVImage(
+    std::unique_ptr<MemoryBuffer> &Img, object::OffloadKind Kind,
+    StringRef CompileOpts, StringRef LinkOpts) {
+  using namespace object;
+
+  // Create inner OffloadBinary containing the raw SPIR-V
+  OffloadBinary::OffloadingImage InnerImage;
+  InnerImage.TheImageKind = ImageKind::IMG_SPIRV;
+  InnerImage.TheOffloadKind = Kind;
+  InnerImage.Flags = 0;
+
+  // Add metadata about the SPIR-V image as string key-value pairs.
+  MapVector<StringRef, StringRef> StringData;
+  StringData["version"] = "1.0";
+  StringData["format"] = "spirv";
+  StringData["triple"] = "spirv64-intel";
+
+  // Store compile/link options if provided
+  if (!CompileOpts.empty())
+    StringData["compile-opts"] = CompileOpts;
+  if (!LinkOpts.empty())
+    StringData["link-opts"] = LinkOpts;
+
+  InnerImage.StringData = StringData;
+
+  // Wrap the raw SPIR-V binary
+  InnerImage.Image = std::move(Img);
+
+  // Serialize inner OffloadBinary
+  SmallVector<OffloadBinary::OffloadingImage> Images;
+  Images.push_back(std::move(InnerImage));
+  SmallString<0> InnerBinaryData = OffloadBinary::write(Images);
+
+  // Replace the buffer with the inner OffloadBinary
+  Img = MemoryBuffer::getMemBufferCopy(InnerBinaryData);
 
-  Img = MemoryBuffer::getMemBufferCopy(YamlFile);
   return Error::success();
 }

>From 2b43d73bc6e492dc1b189e2f0ff251ac39c7ecc5 Mon Sep 17 00:00:00 2001
From: "Duran, Alex" <[email protected]>
Date: Mon, 9 Mar 2026 14:35:10 -0700
Subject: [PATCH 2/6] generalize containerizeImage

---
 .../llvm/Frontend/Offloading/Utility.h        | 32 ++++++------
 llvm/lib/Frontend/Offloading/Utility.cpp      | 49 +++++++++++--------
 2 files changed, 44 insertions(+), 37 deletions(-)

diff --git a/llvm/include/llvm/Frontend/Offloading/Utility.h 
b/llvm/include/llvm/Frontend/Offloading/Utility.h
index 0c2e5e7c860e3..58676ebbd14fc 100644
--- a/llvm/include/llvm/Frontend/Offloading/Utility.h
+++ b/llvm/include/llvm/Frontend/Offloading/Utility.h
@@ -157,30 +157,28 @@ LLVM_ABI Error getAMDGPUMetaDataFromImage(
     uint16_t &ELFABIVersion);
 } // namespace amdgpu
 
-namespace intel {
-/// Containerizes an SPIR-V image into inner OffloadBinary format.
+/// Containerizes an image into inner OffloadBinary format.
 /// Creates a nested OffloadBinary structure where the inner binary contains
-/// the raw SPIR-V and associated metadata (version, format, triple, etc.).
-/// This inner OffloadBinary is then embedded in an outer OffloadBinary.
-///
-/// \param Binary The SPIR-V binary to containerize
-/// \param CompileOpts Optional compilation options
-/// \param LinkOpts Optional linking options
-LLVM_ABI Error containerizeSPIRVImage(std::unique_ptr<MemoryBuffer> &Binary,
-                                      object::OffloadKind Kind,
-                                      StringRef CompileOpts = "",
-                                      StringRef LinkOpts = "");
+/// the raw image and associated metadata (version, format, triple, etc.).
+/// \param Binary The image to containerize
+/// \param ImageKind The format of the image, e.g. SPIR-V or CUBIN.
+/// \param OffloadKind The expected consumer of the image, e.g. CUDA or OpenMP.
+/// \param ImageFlags Flags associated with the image, e.g. for AMDGPU the 
features
+/// \param MetaData The key-value map of metadata to be associated with the 
image.
+LLVM_ABI Error containerizeImage(std::unique_ptr<MemoryBuffer> &Binary,
+    object::ImageKind ImageKind,
+    object::OffloadKind OffloadKind,
+    int32_t ImageFlags,
+    MapVector<StringRef, StringRef> &MetaData);
 
+namespace intel {
 /// Containerizes OpenMP SPIR-V image into inner OffloadBinary format.
 /// \param Binary The SPIR-V binary to containerize
 /// \param CompileOpts Optional compilation options
 /// \param LinkOpts Optional linking options
-inline LLVM_ABI Error containerizeOpenMPSPIRVImage(
+LLVM_ABI Error containerizeOpenMPSPIRVImage(
     std::unique_ptr<MemoryBuffer> &Binary, StringRef CompileOpts = "",
-    StringRef LinkOpts = "") {
-  return containerizeSPIRVImage(Binary, object::OffloadKind::OFK_OpenMP,
-                                CompileOpts, LinkOpts);
-}
+    StringRef LinkOpts = "");
 } // namespace intel
 } // namespace offloading
 } // namespace llvm
diff --git a/llvm/lib/Frontend/Offloading/Utility.cpp 
b/llvm/lib/Frontend/Offloading/Utility.cpp
index d5571a15baf1c..a22b4d894696b 100644
--- a/llvm/lib/Frontend/Offloading/Utility.cpp
+++ b/llvm/lib/Frontend/Offloading/Utility.cpp
@@ -378,30 +378,22 @@ Error 
llvm::offloading::amdgpu::getAMDGPUMetaDataFromImage(
   }
   return Error::success();
 }
-Error offloading::intel::containerizeSPIRVImage(
-    std::unique_ptr<MemoryBuffer> &Img, object::OffloadKind Kind,
-    StringRef CompileOpts, StringRef LinkOpts) {
+
+Error offloading::containerizeImage(std::unique_ptr<MemoryBuffer> &Img,
+                                    object::ImageKind ImageKind,
+                                    object::OffloadKind OffloadKind,
+                                    int32_t ImageFlags,
+                                    MapVector<StringRef, StringRef> &MetaData) 
{
   using namespace object;
 
-  // Create inner OffloadBinary containing the raw SPIR-V
+  // Create inner OffloadBinary containing the raw image
   OffloadBinary::OffloadingImage InnerImage;
-  InnerImage.TheImageKind = ImageKind::IMG_SPIRV;
-  InnerImage.TheOffloadKind = Kind;
-  InnerImage.Flags = 0;
-
-  // Add metadata about the SPIR-V image as string key-value pairs.
-  MapVector<StringRef, StringRef> StringData;
-  StringData["version"] = "1.0";
-  StringData["format"] = "spirv";
-  StringData["triple"] = "spirv64-intel";
-
-  // Store compile/link options if provided
-  if (!CompileOpts.empty())
-    StringData["compile-opts"] = CompileOpts;
-  if (!LinkOpts.empty())
-    StringData["link-opts"] = LinkOpts;
+  InnerImage.TheImageKind = ImageKind;
+  InnerImage.TheOffloadKind = OffloadKind;
+  InnerImage.Flags = ImageFlags;
 
-  InnerImage.StringData = StringData;
+  for (const auto &KV : MetaData)
+    InnerImage.StringData[KV.first] = KV.second;
 
   // Wrap the raw SPIR-V binary
   InnerImage.Image = std::move(Img);
@@ -416,3 +408,20 @@ Error offloading::intel::containerizeSPIRVImage(
 
   return Error::success();
 }
+
+Error offloading::intel::containerizeOpenMPSPIRVImage(
+    std::unique_ptr<MemoryBuffer> &Binary, StringRef CompileOpts,
+    StringRef LinkOpts) {
+  MapVector<StringRef, StringRef> MetaData;
+  MetaData["version"] = "1.0";
+  MetaData["format"] = "spirv";
+  MetaData["triple"] = "spirv64-openmp";
+  if (!CompileOpts.empty())
+    MetaData["compile-opts"] = CompileOpts;
+  if (!LinkOpts.empty())
+    MetaData["link-opts"] = LinkOpts;
+
+  return containerizeImage(Binary, object::ImageKind::IMG_SPIRV,
+                           object::OffloadKind::OFK_OpenMP, /*ImageFlags=*/0,
+                           MetaData);
+}

>From c9646a4e5436d23e439f142ee16896ea6db54f59 Mon Sep 17 00:00:00 2001
From: "Duran, Alex" <[email protected]>
Date: Mon, 9 Mar 2026 14:50:31 -0700
Subject: [PATCH 3/6] format

---
 llvm/include/llvm/Frontend/Offloading/Utility.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/llvm/include/llvm/Frontend/Offloading/Utility.h 
b/llvm/include/llvm/Frontend/Offloading/Utility.h
index 58676ebbd14fc..d8b1256874f7e 100644
--- a/llvm/include/llvm/Frontend/Offloading/Utility.h
+++ b/llvm/include/llvm/Frontend/Offloading/Utility.h
@@ -163,13 +163,15 @@ LLVM_ABI Error getAMDGPUMetaDataFromImage(
 /// \param Binary The image to containerize
 /// \param ImageKind The format of the image, e.g. SPIR-V or CUBIN.
 /// \param OffloadKind The expected consumer of the image, e.g. CUDA or OpenMP.
-/// \param ImageFlags Flags associated with the image, e.g. for AMDGPU the 
features
-/// \param MetaData The key-value map of metadata to be associated with the 
image.
+/// \param ImageFlags Flags associated with the image, e.g. for AMDGPU the
+/// features
+/// \param MetaData The key-value map of metadata to be associated with the
+/// image.
 LLVM_ABI Error containerizeImage(std::unique_ptr<MemoryBuffer> &Binary,
-    object::ImageKind ImageKind,
-    object::OffloadKind OffloadKind,
-    int32_t ImageFlags,
-    MapVector<StringRef, StringRef> &MetaData);
+                                 object::ImageKind ImageKind,
+                                 object::OffloadKind OffloadKind,
+                                 int32_t ImageFlags,
+                                 MapVector<StringRef, StringRef> &MetaData);
 
 namespace intel {
 /// Containerizes OpenMP SPIR-V image into inner OffloadBinary format.

>From 2c6e20f0e391a701efe24604d5dad80348ec697b Mon Sep 17 00:00:00 2001
From: "Duran, Alex" <[email protected]>
Date: Mon, 9 Mar 2026 14:52:10 -0700
Subject: [PATCH 4/6] adjust comments

---
 llvm/include/llvm/Frontend/Offloading/Utility.h | 10 +++++-----
 llvm/lib/Frontend/Offloading/Utility.cpp        |  6 +-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/llvm/include/llvm/Frontend/Offloading/Utility.h 
b/llvm/include/llvm/Frontend/Offloading/Utility.h
index d8b1256874f7e..101a3ea73baf7 100644
--- a/llvm/include/llvm/Frontend/Offloading/Utility.h
+++ b/llvm/include/llvm/Frontend/Offloading/Utility.h
@@ -160,11 +160,11 @@ LLVM_ABI Error getAMDGPUMetaDataFromImage(
 /// Containerizes an image into inner OffloadBinary format.
 /// Creates a nested OffloadBinary structure where the inner binary contains
 /// the raw image and associated metadata (version, format, triple, etc.).
-/// \param Binary The image to containerize
+/// \param Binary The image to containerize.
 /// \param ImageKind The format of the image, e.g. SPIR-V or CUBIN.
 /// \param OffloadKind The expected consumer of the image, e.g. CUDA or OpenMP.
 /// \param ImageFlags Flags associated with the image, e.g. for AMDGPU the
-/// features
+/// features.
 /// \param MetaData The key-value map of metadata to be associated with the
 /// image.
 LLVM_ABI Error containerizeImage(std::unique_ptr<MemoryBuffer> &Binary,
@@ -175,9 +175,9 @@ LLVM_ABI Error 
containerizeImage(std::unique_ptr<MemoryBuffer> &Binary,
 
 namespace intel {
 /// Containerizes OpenMP SPIR-V image into inner OffloadBinary format.
-/// \param Binary The SPIR-V binary to containerize
-/// \param CompileOpts Optional compilation options
-/// \param LinkOpts Optional linking options
+/// \param Binary The SPIR-V binary to containerize.
+/// \param CompileOpts Optional compilation options.
+/// \param LinkOpts Optional linking options.
 LLVM_ABI Error containerizeOpenMPSPIRVImage(
     std::unique_ptr<MemoryBuffer> &Binary, StringRef CompileOpts = "",
     StringRef LinkOpts = "");
diff --git a/llvm/lib/Frontend/Offloading/Utility.cpp 
b/llvm/lib/Frontend/Offloading/Utility.cpp
index a22b4d894696b..de1d69ad0b1fc 100644
--- a/llvm/lib/Frontend/Offloading/Utility.cpp
+++ b/llvm/lib/Frontend/Offloading/Utility.cpp
@@ -386,7 +386,7 @@ Error 
offloading::containerizeImage(std::unique_ptr<MemoryBuffer> &Img,
                                     MapVector<StringRef, StringRef> &MetaData) 
{
   using namespace object;
 
-  // Create inner OffloadBinary containing the raw image
+  // Create inner OffloadBinary containing the raw image.
   OffloadBinary::OffloadingImage InnerImage;
   InnerImage.TheImageKind = ImageKind;
   InnerImage.TheOffloadKind = OffloadKind;
@@ -395,17 +395,13 @@ Error 
offloading::containerizeImage(std::unique_ptr<MemoryBuffer> &Img,
   for (const auto &KV : MetaData)
     InnerImage.StringData[KV.first] = KV.second;
 
-  // Wrap the raw SPIR-V binary
   InnerImage.Image = std::move(Img);
 
-  // Serialize inner OffloadBinary
   SmallVector<OffloadBinary::OffloadingImage> Images;
   Images.push_back(std::move(InnerImage));
   SmallString<0> InnerBinaryData = OffloadBinary::write(Images);
 
-  // Replace the buffer with the inner OffloadBinary
   Img = MemoryBuffer::getMemBufferCopy(InnerBinaryData);
-
   return Error::success();
 }
 

>From d75f4ed889df40946b7c4f16d0bb54c8965887f2 Mon Sep 17 00:00:00 2001
From: "Duran, Alex" <[email protected]>
Date: Mon, 9 Mar 2026 14:54:41 -0700
Subject: [PATCH 5/6] fix intel triple

---
 llvm/lib/Frontend/Offloading/Utility.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Frontend/Offloading/Utility.cpp 
b/llvm/lib/Frontend/Offloading/Utility.cpp
index de1d69ad0b1fc..ef0a40638b444 100644
--- a/llvm/lib/Frontend/Offloading/Utility.cpp
+++ b/llvm/lib/Frontend/Offloading/Utility.cpp
@@ -411,7 +411,7 @@ Error offloading::intel::containerizeOpenMPSPIRVImage(
   MapVector<StringRef, StringRef> MetaData;
   MetaData["version"] = "1.0";
   MetaData["format"] = "spirv";
-  MetaData["triple"] = "spirv64-openmp";
+  MetaData["triple"] = "spirv64-intel";
   if (!CompileOpts.empty())
     MetaData["compile-opts"] = CompileOpts;
   if (!LinkOpts.empty())

>From 1d2884ba72f513925464dfb7cf8af09d94c7c918 Mon Sep 17 00:00:00 2001
From: Alex Duran <[email protected]>
Date: Tue, 10 Mar 2026 15:33:16 +0100
Subject: [PATCH 6/6] Update llvm/lib/Frontend/Offloading/Utility.cpp

Co-authored-by: Yury Plyakhin <[email protected]>
---
 llvm/lib/Frontend/Offloading/Utility.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/llvm/lib/Frontend/Offloading/Utility.cpp 
b/llvm/lib/Frontend/Offloading/Utility.cpp
index ef0a40638b444..ac5224e4ea718 100644
--- a/llvm/lib/Frontend/Offloading/Utility.cpp
+++ b/llvm/lib/Frontend/Offloading/Utility.cpp
@@ -397,9 +397,7 @@ Error 
offloading::containerizeImage(std::unique_ptr<MemoryBuffer> &Img,
 
   InnerImage.Image = std::move(Img);
 
-  SmallVector<OffloadBinary::OffloadingImage> Images;
-  Images.push_back(std::move(InnerImage));
-  SmallString<0> InnerBinaryData = OffloadBinary::write(Images);
+  SmallString<0> InnerBinaryData = OffloadBinary::write(InnerImage);
 
   Img = MemoryBuffer::getMemBufferCopy(InnerBinaryData);
   return Error::success();

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

Reply via email to