Minimize the scope of some variables, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-10-28 02:57:26 +00:00
parent d5de327da0
commit f9219079ac

View File

@ -795,14 +795,14 @@ void DwarfDebug::collectVariableInfoFromMMITable(
if (!VI.Var)
continue;
Processed.insert(VI.Var);
DIVariable DV(VI.Var);
DIExpression Expr(VI.Expr);
LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc);
// If variable scope is not found then skip this variable.
if (!Scope)
continue;
DIVariable DV(VI.Var);
DIExpression Expr(VI.Expr);
ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode());
ConcreteVariables.push_back(make_unique<DbgVariable>(DV, Expr, this));
DbgVariable *RegVar = ConcreteVariables.back().get();