[LLVMdev] [lld] Modeling ELF FileNodes/ControlNodes (Group's) in lld

Joerg Sonnenberger joerg at britannica.bec.de
Wed Sep 4 14:39:40 PDT 2013


On Wed, Sep 04, 2013 at 02:04:14PM -0700, Nick Kledzik wrote:
> I do think we have too many classes.  I thought InputGraph was going
> to replace InputFiles.  It seems link LinkerInput could be merged into
> FileNode. 

I both agree and disagree. Logically we have two different views, the
command line and the resulting input tree on the side and the groups of
object files as seen by the resolver on the other side. The goal of
parseFile is ultimately to transform the first into the second. Agreed
so far?

Want I want to do is encapsulate the "command line" side in LinkerInput,
that means the "logical" path used for error reporting and the buffers
associated with the input. The resolver side should not be involved with
either. I see D1598 (changing parseFile to take LinkerInput) as
necessary step toward D1587 and related changes, i.e. the ability to
properly represent positional flags and hand that information down.

This now leaves out the question whether the command line view and the
resolver view should have the same classes or not. I am not at the point
yet where I can tell what the best behavior is. I can see good reasons
for a strict separation in the class tree, but it may also be more
artifical as separation than necessary.

Joerg



More information about the llvm-dev mailing list