[PATCH] [ELF] Allow customization of OutputELFWriter class

Simon Atanasyan simon at atanasyan.com
Tue Apr 7 22:18:04 PDT 2015


On Wed, Apr 8, 2015 at 4:49 AM, Shankar Kalpathi Easwaran
<shankarke at gmail.com> wrote:
> Prior to this change, the target executable writer's used to contain the TargetLinkingContexts and their TargetLayout's. The Target writers do a static cast and return their layout's which i feel is not a nice design, IMO. I think you could safely derive from OutputELFWriter and create MipsOutputELFWriter. This would save the same amount of duplicated code too. Thoughts ?

I can inherit MipsOutputELFWriter from OutputELFWriter, but finally I
need MipsExecutableWriter and MipsDynamicLibraryWriter. If I inherit
both these classes from MipsExecutableWriter I will have to duplicate
the code from the ExecutableWriter and DynamicLibraryWriter.

> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D8882
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/

-- 
Simon Atanasyan




More information about the llvm-commits mailing list