<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2016, at 7:54 AM, Teresa Johnson <<a href="mailto:tejohnson@google.com" class="">tejohnson@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Thu, Sep 22, 2016 at 11:48 PM, Peter Collingbourne<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:peter@pcc.me.uk" target="_blank" class="">peter@pcc.me.uk</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><p dir="ltr" class="">What do you think about the below interface changes? It seems like they would address most of the concerns you're raising here.</p><p dir="ltr" class="">typedef std::function<AddStreamFn(<wbr class="">unsigned Task, StringRef Key)>  NativeObjectCache;</p><p dir="ltr" class="">NativeObjectCache localCache(std::string CacheDirectoryPath, AddFileFn AddFile);</p><p dir="ltr" class="">Error LTO::run(AddStreamFn AddStream, NativeObjectCache Cache)<span class="Apple-converted-space"> </span></p><p dir="ltr" class="">And remove Cache field from config.</p></blockquote><div class=""><br class=""></div><div class="">Can't speak for Mehdi, but I do like this change - it makes it much clearer that the AddFile is correlated with the local cache implementation, and doesn't require passing it in to LTO::run when e.g. we are doing regular LTO and no caching. It also seems like it would facilitate supporting an in-memory cache as Mehdi asked, since the NativeObjectCache isn't requring the AddFileFn.</div></div></div></blockquote><div><br class=""></div><div>Agree with Teresa. </div><div>LGTM.</div><div><br class=""></div><div>Thanks!</div><div><br class=""></div><div>— </div><div>Mehdi</div><div><br class=""></div></div></body></html>