<div dir="ltr">Hi there :)<br><br>Just a note: There's no need to file a bug if you're already working on the fix anyway. It's probably easier/quicker to provide all the context in the patch/review rather than referring to a bug anyway.<br><br>This change will need a test case - and the test case might help explain why/whether or not this is necessary/what's happening here & whether this is the right approach to address it.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Apr 26, 2018 at 11:00 AM Yunlian Jiang via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">yunlian created this revision.<br>
yunlian added a reviewer: dblaikie.<br>
Herald added subscribers: llvm-commits, JDevlieghere.<br>
<br>
This makes the assertion in PR37255 disappear.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D46137" rel="noreferrer" target="_blank">https://reviews.llvm.org/D46137</a><br>
<br>
Files:<br>
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br>
<br>
<br>
Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br>
===================================================================<br>
--- lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br>
+++ lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br>
@@ -732,8 +732,11 @@<br>
   DIE *ContextDIE;<br>
   DwarfCompileUnit *ContextCU = this;<br>
<br>
-  if (includeMinimalInlineScopes())<br>
+  if (includeMinimalInlineScopes()) {<br>
     ContextDIE = &getUnitDie();<br>
+    if (auto *SPDecl = SP->getDeclaration())<br>
+      getOrCreateSubprogramDIE(SPDecl);<br>
+  }<br>
   // Some of this is duplicated from DwarfUnit::getOrCreateSubprogramDIE, with<br>
   // the important distinction that the debug node is not associated with the<br>
   // DIE (since the debug node will be associated with the concrete DIE, if<br>
<br>
<br>
</blockquote></div>