<div dir="ltr">And the feature that will depend on this is <a href="http://reviews.llvm.org/D3736">http://reviews.llvm.org/D3736</a>.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 12, 2014 at 8:32 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Bigcheese, ruiu, shankarke,<br>
<br>
Make it possible to add observers to an Input Graph, so that files<br>
returned from an Input Graph can be examined before they are<br>
passed to Resolver.<br>
<br>
To implement some PE/COFF features we need to know all the symbols<br>
that *can* be solved, including ones in archive files that are not<br>
yet to be read.<br>
<br>
Currently, Resolver only maintains a set of symbols that are<br>
already read. It has no knowledge on symbols in skipped files in<br>
an archive file.<br>
<br>
There are many ways to implement that. I chose to apply the<br>
observer pattern here because it seems most non-intrusive. We don't<br>
want to mess up Resolver with architecture specific features.<br>
Even in PE/COFF, the feature that needs this mechanism is minor.<br>
So I chose not to modify Resolver, but add a hook to Input Graph.<br>
<br>
<a href="http://reviews.llvm.org/D3735" target="_blank">http://reviews.llvm.org/D3735</a><br>
<br>
Files:<br>
  include/lld/Core/ArchiveLibraryFile.h<br>
  include/lld/Core/InputGraph.h<br>
  lib/Core/InputGraph.cpp<br>
  lib/ReaderWriter/FileArchive.cpp<br>
</blockquote></div><br></div>