[PATCH] Add observers to Input Graph

Rui Ueyama ruiu at google.com
Mon May 12 20:34:23 PDT 2014


And the feature that will depend on this is http://reviews.llvm.org/D3736.


On Mon, May 12, 2014 at 8:32 PM, Rui Ueyama <ruiu at google.com> wrote:

> Hi Bigcheese, ruiu, shankarke,
>
> Make it possible to add observers to an Input Graph, so that files
> returned from an Input Graph can be examined before they are
> passed to Resolver.
>
> To implement some PE/COFF features we need to know all the symbols
> that *can* be solved, including ones in archive files that are not
> yet to be read.
>
> Currently, Resolver only maintains a set of symbols that are
> already read. It has no knowledge on symbols in skipped files in
> an archive file.
>
> There are many ways to implement that. I chose to apply the
> observer pattern here because it seems most non-intrusive. We don't
> want to mess up Resolver with architecture specific features.
> Even in PE/COFF, the feature that needs this mechanism is minor.
> So I chose not to modify Resolver, but add a hook to Input Graph.
>
> http://reviews.llvm.org/D3735
>
> Files:
>   include/lld/Core/ArchiveLibraryFile.h
>   include/lld/Core/InputGraph.h
>   lib/Core/InputGraph.cpp
>   lib/ReaderWriter/FileArchive.cpp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140512/308ebdb3/attachment.html>


More information about the llvm-commits mailing list