[PATCH] D46137: Fix an assertion of This DIE should've already been constructed when the " "definition DIE was created in " "getOrCreateSubprogramDIE
Yunlian Jiang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 3 08:55:58 PDT 2018
yunlian updated this revision to Diff 145027.
yunlian added a comment.
It looks like this error comes from the mixing of LTO, debug fission and -fdebug-info-for-profiling.
In
DwarfCompileUnit::constructAbstractSubprogramScopeDIE, we would not run
getOrCreateSubprogramDIE if includeMinimalInlineScopes() returns True.
In DwarfUnit::applySubprogramAttributes, we would run
DwarfUnit::applySubprogramDefinitionAttributes if includeMinimalInlineScopes() returns False or -fdebug-info-for-profiling is set.
In my case, includeMinimalInlineScopes returns True and -fdebug-info-for-profiling is set. So it did not call getOrCreateSubprogramDIE
but it calls DwarfUnit::applySubprogramDefinitionAttributes to trigger the assertion.
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
@@ -1007,6 +1007,6 @@
}
bool DwarfCompileUnit::includeMinimalInlineScopes() const {
- return getCUNode()->getEmissionKind() == DICompileUnit::LineTablesOnly ||
- (DD->useSplitDwarf() && !Skeleton);
+ return (getCUNode()->getEmissionKind() == DICompileUnit::LineTablesOnly ||
+ (DD->useSplitDwarf() && !Skeleton)) && !getCUNode()->getDebugInfoForProfiling();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46137.145027.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180503/03b572f4/attachment.bin>
More information about the llvm-commits
mailing list