[PATCH] D93900: [llvm-readef/obj] - Change the design structure of ELF dumper. NFCI.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 30 00:14:52 PST 2020


grimar added a comment.

In D93900#2474524 <https://reviews.llvm.org/D93900#2474524>, @MaskRay wrote:

>> Currently we have the ELFDumper class that redirects most of calls to ELFDumperStyle, which can be either GNUStyle or LLVMStyle. Both styles are inhireted from the DumpStyle base class. So we have 4 classes and style classes often have to call methods from the base class (this->dumper()->...). It is not a convenient way.
>
> inhireted -> inherited
>
> "What are the 4 classes and style classes?" needs to be clarified.
>
> I'd rephrase what this patch does:
>
> Currently most overridden functions (inherited from ObjDumper)  in ELFDumper just forward to the functions of `ELFDumperStyle` (which can be either GNUStyle or LLVMStyle).
> A concrete implementation may be in any of ELFDumper/DumperStyle/GNUStyle/LLVMStyle.
>
> This patch reorganizes the classes by introducing GNUStyleELFDumper/LLVMStyleELFDumper which inherit from ELFDumper. The implementations are moved:
>
> - DumperStyle -> ELFDumper
> - GNUStyle -> GNUStyleELFDumper
> - LLVMStyle -> LLVMStyleELFDumper
>
> -----
>
> This refactoring looks good to me.

I think your version explains the change better, thanks!

(FYI, I am leaving on new year holidays, will return back on 11 of january)


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

https://reviews.llvm.org/D93900



More information about the llvm-commits mailing list