[llvm] r215224 - Delete dead code. NFC.

Dimitar Dobrev dpldobrev at yahoo.com
Mon Aug 11 08:56:40 PDT 2014


    I thought the generic interface was not just for ELF but rather that it just wasn't yet implemented for COFF and mach-o. Then it would make sense to have it, wouldn't it?



On Monday, August 11, 2014 3:53 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
 


On 11 August 2014 11:16, Dimitar Dobrev <dpldobrev at yahoo.com> wrote:
>
>     Thanks for the tip. It can be done but this way it's still more
> cumbersome than it used to be. It was just a loop with a call to getPath
> inside. Now I have to find the proper ELF type (because ELFFile is a
> template class) and then manually extract the dependencies. Those wrappers
> were extremely useful in delegating all this work. Are you sure there's no
> way we can restore these functions?

I am sure we should not have a generic interface that only exits for
ELF. It could be a non virtual convenience method in ELFObjectFile as
long it is used in tree (by having ELFDumper use it for example), but
ELFObjectFile is also a template.

If you are interested in improving the generic "ELFObjectFile is a
template" problem, one thing I *think* would work is to have a
non-template ELFObjectFileBase between ObjectFile and ELFObjectFile.
It would have virtual methods implemented by the ELFObjectFile
template, allowing users to choose between the convenience of virtual
dispatch or the efficiency of using the template.


Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140811/36ef63dd/attachment.html>


More information about the llvm-commits mailing list