DebugInfo: Reapply r209984 (reverted in r210143), asserting that abstract DbgVariable...
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 4 Jun 2014 23:50:52 +0000 (23:50 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 4 Jun 2014 23:50:52 +0000 (23:50 +0000)
commit06ac3ffc8f64040c72f17b77012b040dfc08de1d
tree015a7ca075ec82241d3cc6d1dd80e4fb8d349b8a
parent7afb107a274ae27c4db90b785b65d20a8fa18c01
DebugInfo: Reapply r209984 (reverted in r210143), asserting that abstract DbgVariables have DIEs.

Abstract variables within abstract scopes that are entirely optimized
away in their first inlining are omitted because their scope is not
present so the variable is never created. Instead, we should ensure the
scope is created so the variable can be added, even if it's been
optimized away in its first inlining.

This fixes the incorrect debug info in missing-abstract-variable.ll
(added in r210143) and passes an asserts self-hosting build, so
hopefully there's not more of these issues left behind... *fingers
crossed*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210221 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LexicalScopes.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
test/DebugInfo/missing-abstract-variable.ll