[Openmp-commits] [PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Dec 27 11:19:47 PST 2022
tianshilei1992 marked an inline comment as done.
tianshilei1992 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);
+}
----------------
jhuber6 wrote:
> 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.
`str()` returns a `StringRef`, which is good. I thought it returned `const char *`.
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