mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
MachineModuleInfo: Turn nested std::pairs into a proper struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203414 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1185,26 +1185,23 @@ bool DwarfDebug::addCurrentFnArgument(DbgVariable *Var, LexicalScope *Scope) {
|
||||
void DwarfDebug::collectVariableInfoFromMMITable(
|
||||
SmallPtrSet<const MDNode *, 16> &Processed) {
|
||||
for (const auto &VI : MMI->getVariableDbgInfo()) {
|
||||
const MDNode *Var = VI.first;
|
||||
if (!Var)
|
||||
if (!VI.Var)
|
||||
continue;
|
||||
Processed.insert(Var);
|
||||
DIVariable DV(Var);
|
||||
const std::pair<unsigned, DebugLoc> &VP = VI.second;
|
||||
|
||||
LexicalScope *Scope = LScopes.findLexicalScope(VP.second);
|
||||
Processed.insert(VI.Var);
|
||||
DIVariable DV(VI.Var);
|
||||
LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc);
|
||||
|
||||
// If variable scope is not found then skip this variable.
|
||||
if (Scope == 0)
|
||||
continue;
|
||||
|
||||
DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VP.second);
|
||||
DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VI.Loc);
|
||||
DbgVariable *RegVar = new DbgVariable(DV, AbsDbgVariable, this);
|
||||
RegVar->setFrameIndex(VP.first);
|
||||
RegVar->setFrameIndex(VI.Slot);
|
||||
if (!addCurrentFnArgument(RegVar, Scope))
|
||||
addScopeVariable(Scope, RegVar);
|
||||
if (AbsDbgVariable)
|
||||
AbsDbgVariable->setFrameIndex(VP.first);
|
||||
AbsDbgVariable->setFrameIndex(VI.Slot);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user