<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 25, 2010, at 6:08 PM, Talin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>Also, there's another issue I wanted to mention: I have noticed that debugging and inlining don't play very well together. Even if other optimizations are disabled, if I turn on inlining, I get null pointer errors in this piece of code in DwarfDebug::constructInlinedScopeDIE():</div><div><span class="Apple-style-span" style="font-family: monospace; font-size: medium; white-space: pre; "><pre>  <b><font color="#A020F0">if</font></b> (!Scope->getScopeNode())
    <b><font color="#A020F0">return</font></b> NULL;
  DIScope DS(Scope->getScopeNode());
  DIE *ScopeDIE = <b><font color="#A020F0">new</font></b> DIE(dwarf::DW_TAG_inlined_subroutine);

  DISubprogram InlinedSP = getDISubprogram(DS);
  CompileUnit *TheCU = getCompileUnit(InlinedSP);
  DIE *OriginDIE = TheCU->getDIE(InlinedSP);
  assert(OriginDIE && <b><font color="#BC8F8F">"Unable to find Origin DIE!"</font></b>);
  addDIEEntry(ScopeDIE, dwarf::DW_AT_abstract_origin,
              <b><font color="#5F9EA0">dwarf</font></b>::DW_FORM_ref4, OriginDIE);</pre></span></div><div>What's happening is that InlinedSP.DbgNode is NULL, which causes getCompileUnit() to assert.</div></span></blockquote><div><br></div>Please file a bugzilla PR with a reproduce testcase. A small LLVM IR which I can feed to llc to reproduce this crash should be good enough.</div><div>Thanks,</div><div><br></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-<br>Devang<br></div></span></span>
</div>
<br></body></html>