Use a stable topological sort in DwarfCompileUnit::createScopeChildrenDIE()
authorAdrian Prantl <aprantl@apple.com>
Thu, 8 Feb 2018 23:21:15 +0000 (23:21 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 8 Feb 2018 23:21:15 +0000 (23:21 +0000)
commit03dd6f57390217378942eb74cf23bfd47083bb40
treebf633fecb535e3b2aa89da57d7597b58ca7f245c
parente44bdb3f70918c67c99326e12f929e0466a20f9d
Use a stable topological sort in DwarfCompileUnit::createScopeChildrenDIE()

This addresses review feedback for D42940. The topological sort is
slightly more expensive but it can now also detect cycles in the
dependencies and actually works correctly.

rdar://problem/37217988

Differential Review: https://reviews.llvm.org/D43036

llvm-svn: 324677
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/test/DebugInfo/X86/vla-dependencies.ll
llvm/test/DebugInfo/X86/vla-global.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/vla-multi.ll [new file with mode: 0644]