[Openmp-commits] [PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Dec 27 09:01:23 PST 2022


jhuber6 added inline comments.


================
Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp:276-277
+
+  StringRef RawData(CGOutputBuffer.begin(), CGOutputBuffer.size());
+  return MemoryBuffer::getMemBufferCopy(RawData);
+}
----------------
tianshilei1992 wrote:
> jhuber6 wrote:
> > Should work.
> What if `OS` is not `NULL` terminated?
Do we need it to be? The memory buffer should contain the size, unless we need to convert it to a C string somewhere. In that case you could do `OS << '\0'` but it would probably mess up the size.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139287



More information about the Openmp-commits mailing list