<div dir="auto"><div>Sorry for the noise, I misread the code. In that case I don't think it matters much where we return the error from.</div><div dir="auto"><br></div><div dir="auto">Peter<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Dec 13, 2016 8:47 PM, "Mehdi Amini" <<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>> wrote:<br type="attribution"><blockquote class="m_5805734778078166793quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">It changes the moment we emit the error (and I agree that the earlier the better usually, even though there may be cases where you consider a module but don’t include it in the link for instance), but I’m not sure why you think that the current error does not easily allow to diagnose which file has the problem, since it returns an error on the call to `LTO.add(InputFile)` ?<div class="m_5805734778078166793elided-text"><div><br><div><br><div><blockquote type="cite"><div>On Dec 13, 2016, at 8:43 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>> wrote:</div><br class="m_5805734778078166793m_1702042370737861886Apple-interchange-newline"><div><div dir="auto"><div>It could be more useful to do this in InputFile::create, that way the client can easily diagnose which file has the problem.<div dir="auto"><br></div><div dir="auto">Peter</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Dec 13, 2016 8:36 PM, "Mehdi AMINI via Phabricator" <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br type="attribution"><blockquote class="m_5805734778078166793m_1702042370737861886quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mehdi_amini accepted this revision.<br>
mehdi_amini added a comment.<br>
This revision is now accepted and ready to land.<br>
<br>
LGTM.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D27082" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2708<wbr>2</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></div>