[PATCH] D46137: Fix an assertion of This DIE should've already been constructed when the " "definition DIE was created in " "getOrCreateSubprogramDIE
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 26 11:27:22 PDT 2018
Hi there :)
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.
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.
On Thu, Apr 26, 2018 at 11:00 AM Yunlian Jiang via Phabricator <
reviews at reviews.llvm.org> wrote:
> yunlian created this revision.
> yunlian added a reviewer: dblaikie.
> Herald added subscribers: llvm-commits, JDevlieghere.
>
> This makes the assertion in PR37255 disappear.
>
>
> Repository:
> rL LLVM
>
> https://reviews.llvm.org/D46137
>
> Files:
> lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
>
>
> Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
> ===================================================================
> --- lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
> +++ lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
> @@ -732,8 +732,11 @@
> DIE *ContextDIE;
> DwarfCompileUnit *ContextCU = this;
>
> - if (includeMinimalInlineScopes())
> + if (includeMinimalInlineScopes()) {
> ContextDIE = &getUnitDie();
> + if (auto *SPDecl = SP->getDeclaration())
> + getOrCreateSubprogramDIE(SPDecl);
> + }
> // Some of this is duplicated from DwarfUnit::getOrCreateSubprogramDIE,
> with
> // the important distinction that the debug node is not associated with
> the
> // DIE (since the debug node will be associated with the concrete DIE,
> if
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180426/790e757e/attachment.html>
More information about the llvm-commits
mailing list