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

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

Reply via email to