[PATCH] D14128: Enable readobj to emit readelf like output.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 12:43:53 PST 2016


echristo added a comment.

One inline comment that'll require a bit of reworking, but otherwise LGTM for now.

Thanks!

-eric


================
Comment at: tools/llvm-readobj/ELFDumper.cpp:2305
@@ +2304,3 @@
+void GNUStyle<ELFT>::printFileHeaders(const ELFFile<ELFT> *Obj) {
+  const Elf_Ehdr *e = Obj->getHeader();
+  OS << "ELF Header:\n";
----------------
Ugh.

================
Comment at: tools/llvm-readobj/llvm-readobj.h:45
@@ -44,2 +44,3 @@
   extern llvm::cl::opt<bool> MipsPLTGOT;
+  extern llvm::cl::opt<bool> GNUStyle;
 } // namespace opts
----------------
Hate to ask at the last minute but can you make this an enum (admittedly with two choices) so that the checks in the code are positive? (e.g. OutputStyle == GNU and OutputStyle == LLVM)


Repository:
  rL LLVM

http://reviews.llvm.org/D14128





More information about the llvm-commits mailing list