[PATCH] D120610: [DebugInfo] Include DW_TAG_skeleton_unit when looking for parent UnitDie

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 23:17:23 PST 2022


wenlei created this revision.
wenlei added reviewers: dblaikie, ayermolo.
Herald added subscribers: hoy, modimo, hiraditya.
wenlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

`DIE::getUnitDie` looks up parent DIE until compile unit or type unit is found. However for skeleton CU with debug fission, we would have DW_TAG_skeleton_unit instead of DW_TAG_compile_unit as top level DIE.

This change fixes the look up so we can get DW_TAG_skeleton_unit as UnitDie for skeleton CU.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120610

Files:
  llvm/lib/CodeGen/AsmPrinter/DIE.cpp


Index: llvm/lib/CodeGen/AsmPrinter/DIE.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -204,6 +204,7 @@
   const DIE *p = this;
   while (p) {
     if (p->getTag() == dwarf::DW_TAG_compile_unit ||
+        p->getTag() == dwarf::DW_TAG_skeleton_unit ||
         p->getTag() == dwarf::DW_TAG_type_unit)
       return p;
     p = p->getParent();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120610.411581.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220226/87e5be8a/attachment.bin>


More information about the llvm-commits mailing list