[llvm] r210233 - DebugInfo: Roll argument insertion into variable insertion to ensure arguments are correctly handled in all cases.
David Blaikie
dblaikie at gmail.com
Wed Jun 4 18:04:20 PDT 2014
Author: dblaikie
Date: Wed Jun 4 20:04:20 2014
New Revision: 210233
URL: http://llvm.org/viewvc/llvm-project?rev=210233&view=rev
Log:
DebugInfo: Roll argument insertion into variable insertion to ensure arguments are correctly handled in all cases.
No functional change intended.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=210233&r1=210232&r2=210233&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Jun 4 20:04:20 2014
@@ -1134,8 +1134,7 @@ void DwarfDebug::collectVariableInfoFrom
DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VI.Loc);
DbgVariable *RegVar = new DbgVariable(DV, AbsDbgVariable, this);
RegVar->setFrameIndex(VI.Slot);
- if (!addCurrentFnArgument(RegVar, Scope))
- addScopeVariable(Scope, RegVar);
+ addScopeVariable(Scope, RegVar);
}
}
@@ -1202,8 +1201,7 @@ DwarfDebug::collectVariableInfo(SmallPtr
assert(MInsn->isDebugValue() && "History must begin with debug value");
DbgVariable *AbsVar = findAbstractVariable(DV, Scope->getScopeNode());
DbgVariable *RegVar = new DbgVariable(MInsn, AbsVar, this);
- if (!addCurrentFnArgument(RegVar, Scope))
- addScopeVariable(Scope, RegVar);
+ addScopeVariable(Scope, RegVar);
// Check if the first DBG_VALUE is valid for the rest of the function.
if (Ranges.size() == 1 && Ranges.front().second == nullptr)
@@ -1257,8 +1255,7 @@ DwarfDebug::collectVariableInfo(SmallPtr
if (LexicalScope *Scope = LScopes.findLexicalScope(DV.getContext())) {
auto *RegVar = new DbgVariable(
DV, findAbstractVariable(DV, Scope->getScopeNode()), this);
- if (!addCurrentFnArgument(RegVar, Scope))
- addScopeVariable(Scope, RegVar);
+ addScopeVariable(Scope, RegVar);
}
}
}
@@ -1462,6 +1459,8 @@ void DwarfDebug::beginFunction(const Mac
}
void DwarfDebug::addScopeVariable(LexicalScope *LS, DbgVariable *Var) {
+ if (addCurrentFnArgument(Var, LS))
+ return;
SmallVectorImpl<DbgVariable *> &Vars = ScopeVariables[LS];
DIVariable DV = Var->getVariable();
// Variables with positive arg numbers are parameters.
More information about the llvm-commits
mailing list