[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)

Yury Plyakhin via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 18:09:01 PST 2025


YuriPlyakhin wrote:

> > > I'm wondering if we should keep the accessor methods to all take a single image, so the extract code just returns an array of these. You'd need to make sure the reference stays alive but it might be simpler that way, I don't think the interface handles this well, like for checking the image kind.
> > 
> > 
> > Could you please elaborate, I'm not sure I understand what you mean exactly... Maybe you can just provide a sketch of the interface that you have in mind?
> 
> The extract interface already returns a vector of these binaries. We could keep the same extract interface so we don't need to change the get routines to index. The main difference is that these would be slices that share a header so you'd need to manage the memory or create new buffers by copying the header.

I see, interesting idea, I'll try.

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


More information about the llvm-commits mailing list