[PATCH] D27995: Add the ability for DWARFDie objects to get the parent DWARFDie.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 20 11:39:53 PST 2016
clayborg created this revision.
clayborg added reviewers: dblaikie, aprantl, probinson, echristo, llvm-commits.
Herald added subscribers: jgosnell, mehdi_amini.
In order for the llvm DWARF parser to be used in LLDB we will need to be able to get the parent of a DIE. This patch adds that functionality by changing the DWARFDebugInfoEntry class to store a depth field instead of a sibling index. Using a depth field allows us to easily calculate the sibling and the parent without increasing the size of DWARFDebugInfoEntry.
I tested llvm-dsymutil on a debug version of clang where this fully parses DWARF in over 1200 .o files to verify there was no serious regression in performance.
Added a full suite of unit tests to test this functionality.
https://reviews.llvm.org/D27995
Files:
include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h
include/llvm/DebugInfo/DWARF/DWARFDie.h
include/llvm/DebugInfo/DWARF/DWARFUnit.h
lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
lib/DebugInfo/DWARF/DWARFDie.cpp
lib/DebugInfo/DWARF/DWARFUnit.cpp
unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27995.82127.patch
Type: text/x-patch
Size: 16675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161220/88e972d2/attachment.bin>
More information about the llvm-commits
mailing list