[PATCH] D26514: Get rid of DWARFFormValue::getFixedFormSizes(uint8_t AddrSize, uint16_t Version).
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 10:47:03 PST 2016
clayborg created this revision.
clayborg added reviewers: aprantl, dblaikie, llvm-commits.
In preparation for a follow on patch that improves DWARF parsing speed, clean up DWARFFormValue so that we have can get the fixed byte size of a form value given a DWARFUnit or given the version, address byte size and dwarf32/64.
This patch cleans up code so that everyone is using one of the new DWARFFormValue functions:
static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, const DWARFUnit *U = nullptr);
static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, uint16_t Version, uint8_t AddrSize, bool Dwarf32);
This patch changes DWARFFormValue::skipValue() to rely on the output of DWARFFormValue::getFixedByteSize(...) instead of duplicating the numbers here. This will reduce the number of changes we need to make to DWARF to fewer places in DWARFFormValue when we add support for new form.
This patch also starts to support DWARF64 so that we can get correct byte sizes for forms that vary according the DWARF 32/64.
https://reviews.llvm.org/D26514
Files:
include/llvm/DebugInfo/DWARF/DWARFFormValue.h
include/llvm/DebugInfo/DWARF/DWARFUnit.h
lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
lib/DebugInfo/DWARF/DWARFFormValue.cpp
tools/llvm-dwp/llvm-dwp.cpp
unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26514.77512.patch
Type: text/x-patch
Size: 21083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161110/d6f9ef2c/attachment.bin>
More information about the llvm-commits
mailing list