[PATCH] D154754: [llvm-objdump] Change errors to warnings for symbol section name dumping

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 8 00:12:38 PDT 2023


MaskRay marked 2 inline comments as done.
MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.h:120
 
+class Dumper {
+  const object::ObjectFile &O;
----------------
mtrofin wrote:
> mtrofin wrote:
> > nit: `final`
> How about renaming this to `WarningsCollector` and scoping it down to just managing the warnings, and then the `print` functions that can tolerate failures take it as a parameter (instead of being its members)?
There is no virtual function so I think adding `final` has no performance advantage. I think we will soon derive `llvm::objdump::Dumper` like we do for `llvm::ObjDumper` (`llvm/tools/llvm-readobj/ObjDumper.h`). So adding `final` here will lead to one extra line diff in the future...

The name `Dumper` is to match llvm-readobj. In the future, we shall probably move more `print*` functions into member functions and extend `Dumper` with more states, so I think `Dumper` is proper.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154754



More information about the llvm-commits mailing list