The DIE representation of libDebugInfo is designed to be minimal
(as the class name implies). The information that's there allows
to walk the DIE tree down, but you can't get back to the root
from an arbitrary node.
This patch adds this ability with the goal of using it in
llvm-dsymutil. I could also use this information in dwarfdump
itself to easily support dumping the full DIE hierarchy of a
selected DIE when I finally implement a search option.
The added information definitely has a cost: the size of
the structure is increased by 8 bytes on 64 bits archs
due to padding and this combined to the added logic makes
the raw parsing between 5 and 10% slower.
Just for llvm-dsymutil, this is optional. I can gather the
parent chains in a separate path and store them, but I think
that the performance/aded functionality benefit is worth
it. WDYT?