[PATCH] D116997: [CodeGen][Debuginfo][NFC] Refactor DIE values SizeOf method to not depend on AsmPrinter.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 01:03:00 PST 2022


avl created this revision.
avl added reviewers: dblaikie, probinson, JDevlieghere, MaskRay.
Herald added a subscriber: hiraditya.
avl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

SizeOf() method of DIE values(unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const)
depends on AsmPrinter. AsmPrinter is too specific class here. This patch removes dependency
on AsmPrinter and use dwarf::FormParams structure instead. It allows calculate DIE values
size without using AsmPrinter. That refactoring is useful for D96035 <https://reviews.llvm.org/D96035>([dsymutil][DWARFlinker]
implement separate multi-thread processing for compile units.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116997

Files:
  llvm/include/llvm/BinaryFormat/Dwarf.h
  llvm/include/llvm/CodeGen/AsmPrinter.h
  llvm/include/llvm/CodeGen/DIE.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/AsmPrinter/DIE.cpp
  llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  llvm/unittests/CodeGen/DIETest.cpp
  llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116997.398866.patch
Type: text/x-patch
Size: 25495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220111/28b2568d/attachment.bin>


More information about the llvm-commits mailing list