[PATCH] D86718: [llvm-readobj] - Simplify the code that creates dumpers. NFCI.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 08:30:11 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, sbc100.
Herald added a project: LLVM.
grimar requested review of this revision.
Herald added a subscriber: aheejin.

We have a few helper functions like the following:

  std::error_code create*Dumper(...)

In fact we do not need or want to use `std::error_code` and the code
can be simpler if we just return `std::unique_ptr<ObjDumper>`.

This patch does this change and refines the signature of `createDumper`
as well.


https://reviews.llvm.org/D86718

Files:
  llvm/tools/llvm-readobj/COFFDumper.cpp
  llvm/tools/llvm-readobj/ELFDumper.cpp
  llvm/tools/llvm-readobj/MachODumper.cpp
  llvm/tools/llvm-readobj/ObjDumper.h
  llvm/tools/llvm-readobj/WasmDumper.cpp
  llvm/tools/llvm-readobj/XCOFFDumper.cpp
  llvm/tools/llvm-readobj/llvm-readobj.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86718.288344.patch
Type: text/x-patch
Size: 14794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200827/3f9aac5b/attachment.bin>


More information about the llvm-commits mailing list