From: David Blaikie Date: Tue, 28 Oct 2014 02:57:26 +0000 (+0000) Subject: Minimize the scope of some variables, NFC. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=f9219079ac6141280177bf4b5c32a24013aae7f6;ds=sidebyside Minimize the scope of some variables, NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220759 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 68f10275dc6..f9ef6d09ff5 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -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(DV, Expr, this)); DbgVariable *RegVar = ConcreteVariables.back().get();