[PATCH] D62594: [llvm-readobj] - Rewrite reloc-types.test to use YAML. NFCI.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 07:59:58 PDT 2019

grimar created this revision.
grimar added reviewers: jhenderson, rupprecht, jakehehrlich, MaskRay.
Herald added subscribers: atanasyan, kristof.beyls, arichardson, javed.absar, sdardis.

This change rewrites `reloc-types.test`
to use `yaml2obj` instead of precompiled binaries.
That allowed to remove 7 precompiled objects from the inputs.

I took the existent objects, used `obj2yaml` on them, simplified the result and
used yaml2obj in the test case with the result.


1. I converted, but did not remove `relocs.obj.elf-i386`, `relocs.obj.elf-x86_64` or `relocs.obj.elf-mips` objects

because found they are used in other tests. I think it is bad practice to spread using
the precompiled objects with no reason and would be better to convert those tests
to use yaml instead too. Going to do that.

2. I was unable to convert `relocs.obj.elf-ppc64`, because `obj2yaml` hangs on this file for me.

I'll take a look.

3. I was unable to convert `relocs.obj.macho-arm`, `relocs.obj.macho-i386` and `relocs.obj.macho-x86_64`

because the output produced by `obj2yaml` does not seem to be correct. Or at least I was unable to
use it with `yaml2obj` to make the existent tests pass.

4. Because of the above I did not remove the script for creating all of those objects: `test\tools\llvm-readobj\Inputs\relocs.py`

5. I found a few unused check lines and updated the "Todo:" section in the test case header.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62594.201914.patch
Type: text/x-patch
Size: 105901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190529/e825412d/attachment-0001.bin>

More information about the llvm-commits mailing list