Fixed the ability to recursively get an attribute value from a DWARFDie.
authorGreg Clayton <gclayton@apple.com>
Mon, 27 Nov 2017 22:12:44 +0000 (22:12 +0000)
committerGreg Clayton <gclayton@apple.com>
Mon, 27 Nov 2017 22:12:44 +0000 (22:12 +0000)
commitd6b67eb15c3640c38d2e12f83373def07ca6fae9
tree262876b3b8b3e88452483f5201330a6caf8bc02d
parent4aa519507d3234cf7843f1c6079dc783ed088dc2
Fixed the ability to recursively get an attribute value from a DWARFDie.

The previous implementation would only look 1 DW_AT_specification or DW_AT_abstract_origin deep. This means DWARFDie::getName() would fail in certain cases. I ran into such a case while creating a tool that used the LLVM DWARF parser to generate a symbolication format so I have seen this in the wild.

Differential Revision: https://reviews.llvm.org/D40156

llvm-svn: 319104
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp