[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 14:13:16 PDT 2020


grimar added a comment.

In D86718#2242876 <https://reviews.llvm.org/D86718#2242876>, @MaskRay wrote:

> 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?

I think it should never fail. The idea of llvm-readobj/elf is all about dumping all kind of objects, e.g. they must be able to dump broken objects.
I believe we always want to be able at least to create dumpers.


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

https://reviews.llvm.org/D86718



More information about the llvm-commits mailing list