[PATCH] D89071: [SystemZ/z/OS] Add GOFFObjectFile class and details of GOFF file format

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 00:42:27 PST 2020


jhenderson added inline comments.


================
Comment at: llvm/lib/Object/GOFFObjectFile.cpp:49-50
+
+  const uint8_t *End = reinterpret_cast<const uint8_t *>(Data.getBufferEnd());
+  for (const uint8_t *I = base(); I < End; I += GOFF::RecordLength) {
+    uint8_t RecordType = (I[1] & 0xF0) >> 4;
----------------
kpn wrote:
> jhenderson wrote:
> > yusra.syeda wrote:
> > > jhenderson wrote:
> > > > As noted earlier - it might be better to use the `DataExtractor` and `Cursor` class to make parsing easier.
> > > The DataExtractor class doesn't seem to be helpful. It's best use is if the data is read sequential, which is not the case with GOFF.
> > You can use `DataExtractor` with offsets, rather than a `Cursor`, if the read is jumping around.
> Does this mean the ability to read RECFM=VB GOFF datasets is explicitly being designed to be impossible?
I'm not sure if this comment is being directed at me or @yusra.syeda. If at me, I don't really understand the question as I don't know the file format.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89071



More information about the llvm-commits mailing list