Minimize the scope of some variables, NFC.

llvm-svn: 220759
This commit is contained in:
David Blaikie 2014-10-28 02:57:26 +00:00
parent 9ccce99e1d
commit ff468a5e0b
1 changed files with 2 additions and 2 deletions

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();