================
@@ -916,15 +916,20 @@ class SYCLWrapper {
std::pair<Constant *, Constant *>
initOffloadEntriesPerImage(StringRef Entries, const Twine &OffloadKindTag) {
SmallVector<Constant *> EntriesInits;
- std::unique_ptr<MemoryBuffer> MB = MemoryBuffer::getMemBuffer(
- Entries, /*BufferName*/ "", /*RequiresNullTerminator*/ false);
- for (line_iterator LI(*MB); !LI.is_at_eof(); ++LI) {
- GlobalVariable *GV =
- emitOffloadingEntry(M, /*Kind*/ OffloadKind::OFK_SYCL,
-
Constant::getNullValue(PointerType::getUnqual(C)),
- /*Name*/ *LI, /*Size*/ 0,
- /*Flags*/ 0, /*Data*/ 0);
+ const char *Current = Entries.data();
+ const char *End = Current + Entries.size();
+ while (Current < End) {
+ StringRef Name(Current);
----------------
YuriPlyakhin wrote:
I'll look at how to make the code prettier though :)
https://github.com/llvm/llvm-project/pull/169425
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits