<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><div style="direction: inherit;">Sneaky ping on <a href="https://reviews.llvm.org/D23132">https://reviews.llvm.org/D23132</a> :)</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">(In the meantime: +1 to Peter, please revert)</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">-- </div><div style="direction: inherit;">Mehdi</div>Sent from my iPhone</div><div><br>On Sep 12, 2016, at 7:56 PM, Davide Italiano <<a href="mailto:davide@freebsd.org">davide@freebsd.org</a>> wrote:<br><br></div><blockquote type="cite"><div><span>On Mon, Sep 12, 2016 at 7:49 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk">peter@pcc.me.uk</a>> wrote:</span><br><blockquote type="cite"><span>We shouldn't expose the module here because we will eventually want this</span><br></blockquote><blockquote type="cite"><span>class to wrap the bitcode symbol table rather than the module.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Is there something more minimal you can expose here to achieve the same</span><br></blockquote><blockquote type="cite"><span>goal?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span></span><br><span>The intent here is to replace this code:</span><br><span></span><br><span>void BitcodeCompiler::add(BitcodeFile &F) {</span><br><span>  std::unique_ptr<IRObjectFile> Obj = std::move(F.Obj);</span><br><span>  std::vector<GlobalValue *> Keep;</span><br><span>  unsigned BodyIndex = 0;</span><br><span>  ArrayRef<Symbol *> Syms = F.getSymbols();</span><br><span></span><br><span>  Module &M = Obj->getModule();</span><br><span>  if (M.getDataLayoutStr().empty())</span><br><span>    fatal("invalid bitcode file: " + F.getName() + " has no datalayout");</span><br><span></span><br><span></span><br><span>Is there a way to get the data layout without accessing the module?</span><br><span>Otherwise lld fails without emitting a diagnostic, which is not ideal.</span><br><span></span><br><span>If you don't want this to be exposed, I can move the logic to libLTO</span><br><span>itself, i.e. inside LTO::add() but I'm not quite sure how that will</span><br><span>affect the other clients.</span><br><span></span><br><span>Thanks,</span><br><span></span><br><span>--</span><br><span>Davide</span><br></div></blockquote></body></html>