[lld] r220182 - [ELF] Check for target architecture.

Shankar Easwaram shankarke at gmail.com
Mon Oct 20 04:40:29 PDT 2014


I agree that it would be simpler to add all the functionality in the parent class which is the ELFObjectReader, but i think it's much cleaner and flexible with each elf subtarget own what all in the elf header to check. 

For example ARM may need to check against other attributes too.

Shankar Easwaran 



> On Oct 20, 2014, at 03:41, Renato Golin <renato.golin at linaro.org> wrote:
> 
>> On 20 October 2014 05:00, Shankar Easwaran <shankarke at gmail.com> wrote:
>> The canParse function for all the ELF subtargets check if the input files match
>> the subtarget.
> 
> Hi Shankar,
> 
> I'm new at the lld code, but it seems like a whole lot of repetition
> for such a simple method. If you could cache the arch definitions
> locally, this could be a single method on the parent of those classes,
> comparing to the "static const Arch" or equivalent, no?
> 
> cheers,
> --renato




More information about the llvm-commits mailing list