[PATCH] D65832: [llvm-readelf] Implement NT_FILE core file parsing

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 02:35:05 PDT 2019


grimar added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:5556
+    return;
+  }
+
----------------
rupprecht wrote:
> grimar wrote:
> > This part is common and can be reused for both LLVM and GNU styles:
> > 
> > ```
> >   if (NoteType != ELF::NT_FILE)
> >     return;
> > 
> >   Expected<CoreNote<ELFT>> Note = readCoreNote<ELFT>(Desc);
> >   if (!Note) {
> >     warn(Note.takeError());
> >     return;
> >   }
> > ```
> > 
> > I.e. I would try either add a one more helper or try to combine `printCoreNoteLLVMStyle` and `printCoreNote`.
> I moved some of this into the GNU/LLVMStyle::printNotes methods and it's a bit more succinct now, PTAL -- I'm not sure if it's what you're going for.
Looks fine, thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65832





More information about the llvm-commits mailing list