jmmartinez added a comment. Just a few minor comments. Everything else seems good to me.
================ Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:698 + // an inlined function: if a local variable has a templated type with + // a function-local type as a template parameter. See PR55680 for details. + if (!Scope->isAbstractScope() && !Scope->getInlinedAt()) { ---------------- I cannot find the link to PR55680. Would you mind sharing it? You could also reference `local-type-as-template-parameter.ll`, your test depicts the issue very clearly. ================ Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:700-701 + if (!Scope->isAbstractScope() && !Scope->getInlinedAt()) { + if (LexicalBlockDIEs.count(DS)) { + ScopeDIE = LexicalBlockDIEs[DS]; + assert(!ScopeDIE->findAttribute(dwarf::DW_AT_low_pc) && ---------------- NIT: You could use `find` to avoid searching in `LexicalBlockDIEs` twice. ================ Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:712-714 + assert(!getAbstractScopeDIEs().count(DS) && + "Abstract DIE for this scope exists!"); + getAbstractScopeDIEs()[DS] = ScopeDIE; ---------------- NIT: You could use `insert/try_emplace` instead of using `count` and `operator[]`. The assertion would become something like: ``` auto Inserted = getAbstractScopeDIEs().try_emplace(DS, ScopeDIE); assert(Inserted.second && "Abstract DIE for this scope exists!"); return ScopeDIE; ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144006/new/ https://reviews.llvm.org/D144006 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits