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

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 06:35:15 PST 2020


kpn 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;
----------------
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?


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