[PATCH] D126812: [Binary] Promote OffloadBinary to inherit from Binary
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 1 13:32:51 PDT 2022
jhuber6 added a comment.
Thanks for the comments, I'll address them real quick.
================
Comment at: llvm/include/llvm/Object/OffloadBinary.h:121
const Entry *TheEntry)
- : Buffer(Buffer), TheHeader(TheHeader), TheEntry(TheEntry) {
-
+ : Binary(Binary::ID_Offload, Source), Buffer(Source.getBufferStart()),
+ TheHeader(TheHeader), TheEntry(TheEntry) {
----------------
tra wrote:
> We're losing information by passing only the start of the buffer.
> I'd change the type of `Buffer` field to `MemoryBufferRef` instead.
Forgot to remove this one. I just put this here for convenience's sake since I need to index the `MemoryBufferRef` directly as a char array. The underlying `Binary` type already contains the buffer ref so we're not losing it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126812/new/
https://reviews.llvm.org/D126812
More information about the cfe-commits
mailing list