[PATCH] Improve big-endian support for ARM and AArch64

Renato Golin renato.golin at linaro.org
Wed Sep 24 05:27:15 PDT 2014


On 24 September 2014 13:22, Charlie Turner <charlie.turner at arm.com> wrote:
> Into an equivalent switch case. Since ELFObjectFile::getArch() was not returning Triple::ppc, there was no way for me to complete the refactoring without first removing functionality to add back in a later patch.

I see. Should be fine, then.


> I'm not sure how you would like me to test the refactoring. The only approach I can think of is to add 11 test cases where llvm-dwarfdump is run on each of the 11 object files supported by RelocToApply::visit. The test would check that the message "error: failed to compute relocation" was not issued for any of these object files, which would indicate that the refactoring missed an if/else branch. Is that what you had in mind, or is a manual check by eye to see if I got each of the 11 cases converted enough? The 11 cases I'm referring to are the various file format strings like "ELF64-x86_64", "ELF32-i386", and so on. I counted 11 of them.

I think that would be enough, though maybe someone closer to the code
could have a better idea.


> Can you elaborate on your worry? I'm not sure what action you would like me to take.

If any external tool used that output for anything, being consistent
(rather than informative) would be better. But AFAICS, the output
you're generating is for debug purpose only, so in theory, this should
be ok. I think you can safely ignore that comment.

cheers,
--renato




More information about the llvm-commits mailing list