]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
Minimize the scope of some variables, NFC.
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 28 Oct 2014 02:57:26 +0000 (02:57 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 28 Oct 2014 02:57:26 +0000 (02:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220759 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 68f10275dc618b30b7ba2b5f8174143c12f25982..f9ef6d09ff56e5b117ecc0eb995a55c5437a97b6 100644 (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();