<div dir="ltr">Thanks for the review Jim and Meador. Committed in r176459.<div><br></div><div style>- Lang.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 4, 2013 at 11:34 AM, Meador Inge <span dir="ltr"><<a href="mailto:meadori@codesourcery.com" target="_blank">meadori@codesourcery.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 03/03/2013 06:40 PM, Lang Hames wrote:<br>
<br>
> Hi All,<br>
><br>
> llvm-extract has tricked me a couple of times by handing me back an empty module<br>
> when I asked it to extract a linkonce function. The problem is that when DCE<br>
> tidies up the module, it strips out the function that you wanted to extract.<br>
><br>
> To avoid that problem, this patch sets the linkage on any function that was<br>
> requested on the command line, and that would be discarded by DCE, to<br>
> ExternalLinkage.<br>
><br>
> Given the use cases that I'm aware of for llvm-extract I think this should be an<br>
> improvement. It certainly seems better than handing back an empty module. If<br>
> anybody is concerned about this quietly changing the linkage type then I can<br>
> improve the patch to restore the original linkage types after DCE is run.<br>
<br>
</div></div>Test case? I see a few tests using llvm-extract under test/Other/.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Meador Inge<br>
CodeSourcery / Mentor Embedded<br>
</font></span></blockquote></div><br></div>