<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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 2017-Jan-30, at 18:36, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk" class="">peter@pcc.me.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 30, 2017 at 6:08 PM, Duncan P. N. Exon Smith <span dir="ltr" class=""><<a href="mailto:dexonsmith@apple.com" target="_blank" class="">dexonsmith@apple.com</a>></span> wrote:<br class=""><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">I'm having trouble paging this back in.<br class="">
<br class="">
IIRC, one goal was to improve compile time by checking fewer fields.</blockquote><div class=""><br class=""></div><div class="">I thought that was the point of the stuff in getHashValue() ?</div></div></div></div></div></blockquote><div><br class=""></div><div>Maybe I'm not remembering correctly then...</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">That said, over the weekend I had some ideas about how to fix this debug info odr business in a (IMHO) more principled way. If I get a chance I'll send an RFC with a brain dump to llvm-dev.</div></div></div></div></div></blockquote><div><br class=""></div><div>I'll look forward to it.  I had some (more) principled thing I was tacking toward that I've frankly lost track of; I'll see if I can remind myself in time for your post.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Do you happen to know why the LinkageName wasn't sufficient here?  Sure, this fixes a crash, but why?<br class=""></blockquote><div class=""><br class=""></div><div class="">If we clone a module and try to disambiguate just based on LinkageName we will consider the DISubprogram referring to the cloned DICompileUnit (via TemplateParams) and the one referring to the original DICompileUnit to be the same. That way we will end up with a cloned module containing a non-distinct DISubprogram from the original module, itself referring to a DICompileUnit not appearing in <a href="http://llvm.dbg.cu/" class="">llvm.dbg.cu</a> (i.e. the one from the original module), which fails the verifier.</div></div></div></div></div></blockquote><div><br class=""></div><div>Ah, this happens when cloning modules.  I hadn't considered that would use a single context.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
Also, for debug info testcases that aren't handmade, we usually include the C/C++ source in comments so that it's easy to regenerate them.  Maybe if I saw the source I would understand the root cause.<br class=""></blockquote><div class=""><br class=""></div><div class="">Okay, I'll also add the source. It's basically the test case from <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=682773#c14" class="">https://bugs.chromium.org/p/chromium/issues/detail?id=682773#c14</a> with the definitions removed.</div></div></div></div></div></blockquote><div><br class=""></div><div>Thanks!</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">Thanks,</div></div>-- <br class=""><div class="gmail-m_807498182752138407gmail_signature"><div dir="ltr" class="">-- <div class="">Peter</div></div></div>
</div></div>
</div></blockquote></div><br class=""></body></html>