OSDN Git Service

Correct the parent testing to avoid the special case where a DIE has a depth of 1
authorGreg Clayton <gclayton@apple.com>
Wed, 4 Jan 2017 00:10:50 +0000 (00:10 +0000)
committerGreg Clayton <gclayton@apple.com>
Wed, 4 Jan 2017 00:10:50 +0000 (00:10 +0000)
commitc8a8076d811cf95de46ca5d3093e500c757d2f0a
tree94e0a99596f130bd1e07007ccb433157603220db
parentf7951f47fa36e7bef071c26d33b0382a83f90242
Correct the parent testing to avoid the special case where a DIE has a depth of 1

This test was testing that we could correctly find the parent of a DIE, but it was actually just testing the special case where a DIE's depth was 1. This corrects that error by adding an extra level into the the DWARF to ensure that we correctly get the parent by looking for the parent with a depth that is 1 less than the current depth.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290918 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp