[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
Mon Nov 2 00:48:15 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;
----------------
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.


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