[PATCH] D115325: [DWARF] Fix PR51087 Extraneous enum record in DWARF with type units

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 16 08:19:56 PST 2021


Orlando updated this revision to Diff 394885.
Orlando marked an inline comment as done.
Orlando added a comment.

+ Factored shared code into `createMaybeUnusedType`
+ Added retained types test `llvm/test/DebugInfo/X86/type-units-unused-type.mir`

> So in this example the result is unchanged despite the code change to the retained types handling? (or it does change, but not enough?)

Yeah that's right, the result is unchanged unfortunately.

> Would a simpler struct (struct x { }; x y;) show a positive change (remove the skeleton type DIE from the CU)? That'd be enough of an incentive now. Further value might need follow-up patches.

I managed to get a very simple test case from source (just `struct X {};`) working in the end by compiling with `-Xclang -debug-info-kind=unused-types`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115325/new/

https://reviews.llvm.org/D115325

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
  llvm/test/DebugInfo/X86/type-units-unused-nested-enums.mir
  llvm/test/DebugInfo/X86/type-units-unused-type.mir
  llvm/test/DebugInfo/X86/type-units-used-enum.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115325.394885.patch
Type: text/x-patch
Size: 14196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211216/e7201c10/attachment.bin>


More information about the llvm-commits mailing list