[Dwarf] early exit to avoid creating dangling DIEs
authorManman Ren <mren@apple.com>
Thu, 31 Jan 2013 20:05:14 +0000 (20:05 +0000)
committerManman Ren <mren@apple.com>
Thu, 31 Jan 2013 20:05:14 +0000 (20:05 +0000)
commit8b15d74434dfde5ea9227b985c2c934f62bf03a7
tree8f5b1e57364303e2931e5750a276970de4937d1a
parent108fb3202af6f500073cdbb7be32c25d7a273a2e
[Dwarf] early exit to avoid creating dangling DIEs

We used to create children DIEs for a scope, then check whether ScopeDIE is
null. If ScopeDIE is null, the children DIEs will be dangling. Other DIEs can
link to those dangling DIEs, which are not emitted at all, causing dwarf error.

The current testing case is 4k lines, from MultiSource/BenchMark/McCat/09-vor.

rdar://problem/13071959

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174084 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfDebug.cpp