mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
DebugInfo: Roll argument insertion into variable insertion to ensure arguments are correctly handled in all cases.
No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210233 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1134,7 +1134,6 @@ void DwarfDebug::collectVariableInfoFromMMITable(
|
|||||||
DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VI.Loc);
|
DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VI.Loc);
|
||||||
DbgVariable *RegVar = new DbgVariable(DV, AbsDbgVariable, this);
|
DbgVariable *RegVar = new DbgVariable(DV, AbsDbgVariable, this);
|
||||||
RegVar->setFrameIndex(VI.Slot);
|
RegVar->setFrameIndex(VI.Slot);
|
||||||
if (!addCurrentFnArgument(RegVar, Scope))
|
|
||||||
addScopeVariable(Scope, RegVar);
|
addScopeVariable(Scope, RegVar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1202,7 +1201,6 @@ DwarfDebug::collectVariableInfo(SmallPtrSet<const MDNode *, 16> &Processed) {
|
|||||||
assert(MInsn->isDebugValue() && "History must begin with debug value");
|
assert(MInsn->isDebugValue() && "History must begin with debug value");
|
||||||
DbgVariable *AbsVar = findAbstractVariable(DV, Scope->getScopeNode());
|
DbgVariable *AbsVar = findAbstractVariable(DV, Scope->getScopeNode());
|
||||||
DbgVariable *RegVar = new DbgVariable(MInsn, AbsVar, this);
|
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.
|
// Check if the first DBG_VALUE is valid for the rest of the function.
|
||||||
@ -1257,7 +1255,6 @@ DwarfDebug::collectVariableInfo(SmallPtrSet<const MDNode *, 16> &Processed) {
|
|||||||
if (LexicalScope *Scope = LScopes.findLexicalScope(DV.getContext())) {
|
if (LexicalScope *Scope = LScopes.findLexicalScope(DV.getContext())) {
|
||||||
auto *RegVar = new DbgVariable(
|
auto *RegVar = new DbgVariable(
|
||||||
DV, findAbstractVariable(DV, Scope->getScopeNode()), this);
|
DV, findAbstractVariable(DV, Scope->getScopeNode()), this);
|
||||||
if (!addCurrentFnArgument(RegVar, Scope))
|
|
||||||
addScopeVariable(Scope, RegVar);
|
addScopeVariable(Scope, RegVar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1462,6 +1459,8 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DwarfDebug::addScopeVariable(LexicalScope *LS, DbgVariable *Var) {
|
void DwarfDebug::addScopeVariable(LexicalScope *LS, DbgVariable *Var) {
|
||||||
|
if (addCurrentFnArgument(Var, LS))
|
||||||
|
return;
|
||||||
SmallVectorImpl<DbgVariable *> &Vars = ScopeVariables[LS];
|
SmallVectorImpl<DbgVariable *> &Vars = ScopeVariables[LS];
|
||||||
DIVariable DV = Var->getVariable();
|
DIVariable DV = Var->getVariable();
|
||||||
// Variables with positive arg numbers are parameters.
|
// Variables with positive arg numbers are parameters.
|
||||||
|
Reference in New Issue
Block a user