[PATCH] D34570: [DWARF] NFC: Collect info needed by DWARFFormValue into a helper

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 23 13:33:01 PDT 2017


probinson created this revision.
Herald added a subscriber: hiraditya.

The size of the value described by a form can depend on DWARF format (32/64-bit), DWARF version, or the size of a target address.  Collect these parameters into a class to make it simpler to pass them around, and have just one place to define query methods that understand the effect of the parameters on form sizes.

Inspired by review comments on https://reviews.llvm.org/D33155.  This patch seemed worth splitting out as it was a bunch of typing and fiddled with an API, while still being NFC.  A subsequent step would be to collect up the section references needed for retrieving the value (as opposed to the size) of the attribute described be the form, which should finish the job of making DWARFFormValue agnostic to whether the data comes from a "unit" or a line-table section.


https://reviews.llvm.org/D34570

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
  llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
  llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
  llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
  llvm/tools/dsymutil/DwarfLinker.cpp
  llvm/tools/llvm-dwp/llvm-dwp.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34570.103755.patch
Type: text/x-patch
Size: 33356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170623/8fce04ac/attachment.bin>


More information about the llvm-commits mailing list