Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1757,8 +1757,11 @@ void DwarfCompileUnit::createBaseTypeDIEs() {
DIE *DwarfCompileUnit::getLexicalBlockDIE(const DILexicalBlock *LB) {
// Assume if there is an abstract tree all the DIEs are already emitted.
bool isAbstract = getAbstractScopeDIEs().count(LB->getSubprogram());
if (isAbstract && getAbstractScopeDIEs().count(LB))
return getAbstractScopeDIEs()[LB];
if (isAbstract) {
auto &DIEs = getAbstractScopeDIEs();
if (auto It = DIEs.find(LB); It != DIEs.end())
return It->second;
}
assert(!isAbstract && "Missed lexical block DIE in abstract tree!");

// Return a concrete DIE if it exists or nullptr otherwise.
Expand Down