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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 12:24:45 PDT 2020


MaskRay added a comment.

The observation of this patch is that `createDumper` does not fail.

The construction of an `ObjectFile` just inspects the leading magic bytes (`isELF` `isMachO` ...). `createDumper` dispatches on magic bytes to different binary formats. Indeed currently the various `create*Dumper` do not fail, but is it possible that we will enforce stricter verification in the future? If so, the new interface with the unique_ptr return type does not seem very suitable.


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

https://reviews.llvm.org/D86718



More information about the llvm-commits mailing list