jhuber6 added inline comments.

================
Comment at: clang/docs/ClangOffloadPackager.rst:31-32
+    uint32_t Flags;
+    StringMap<StringRef> StringData;
+    MemoryBufferRef Image;
+  };
----------------
yaxunl wrote:
> This makes the file format depend on LLVM version and potentially standard 
> C++ library version.
> 
> If it is consumed by the same version of LLVM, it may be fine.
> 
> However, if it is intended for a generic file format to be consumed by 
> generic offloading language runtimes, it is better to use C-like simple data 
> layout which does not depend on LLVM or standard C++ library.
That format just stores the data before it's serialized to a binary format. The 
binary format is basically just a few headers and a string table. See 
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Object/OffloadBinary.h#L91
 for the real format. I didn't want to explain it all in detail here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125165/new/

https://reviews.llvm.org/D125165

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to