[PATCH] D87040: [llvm-readelf/obj] - Cleanup the interface of `DumpStyle`. NFCI.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 01:22:31 PDT 2020
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:697-698
+ DumpStyle(ELFDumper<ELFT> *Dumper)
+ : Obj(*Dumper->getElfObject()->getELFFile()), Dumper(Dumper) {
FileName = this->Dumper->getElfObject()->getFileName();
}
----------------
Another minor improvement you could do is initialise `FileName` in the initialiser list. Separate patch that one though.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:3581
+template <class ELFT> void GNUStyle<ELFT>::printGroupSections() {
+ std::vector<GroupSection> V = getGroups<ELFT>(&this->Obj, this->FileName);
DenseMap<uint64_t, const GroupSection *> Map = mapSectionsToGroups(V);
----------------
Maybe worth changing `getGroups` to take a reference too, whilst you're at it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87040/new/
https://reviews.llvm.org/D87040
More information about the llvm-commits
mailing list