parent
6ac7d7d068
commit
fbd6c45e06
|
@ -2145,30 +2145,22 @@ void DwarfDebug::collectVariableInfo(const MachineFunction *MF) {
|
||||||
if (Processed.count(DV) != 0)
|
if (Processed.count(DV) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (DV.getTag() == dwarf::DW_TAG_arg_variable) {
|
|
||||||
// FIXME Handle inlined subroutine arguments.
|
|
||||||
DbgVariable *ArgVar = new DbgVariable(DV);
|
|
||||||
CurrentFnDbgScope->addVariable(ArgVar);
|
|
||||||
DbgValueStartMap[MInsn] = ArgVar;
|
|
||||||
DbgVariableToDbgInstMap[ArgVar] = MInsn;
|
|
||||||
Processed.insert(DV);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
DbgScope *Scope = findDbgScope(MInsn);
|
DbgScope *Scope = findDbgScope(MInsn);
|
||||||
|
if (!Scope && DV.getTag() == dwarf::DW_TAG_arg_variable)
|
||||||
|
Scope = CurrentFnDbgScope;
|
||||||
// If variable scope is not found then skip this variable.
|
// If variable scope is not found then skip this variable.
|
||||||
if (Scope == 0)
|
if (!Scope)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Processed.insert(DV);
|
Processed.insert(DV);
|
||||||
DbgVariable *AbsDbgVariable = findAbstractVariable(DV, MInsn->getDebugLoc());
|
|
||||||
DbgVariable *RegVar = new DbgVariable(DV);
|
DbgVariable *RegVar = new DbgVariable(DV);
|
||||||
DbgValueStartMap[MInsn] = RegVar;
|
|
||||||
DbgVariableToDbgInstMap[RegVar] = MInsn;
|
DbgVariableToDbgInstMap[RegVar] = MInsn;
|
||||||
Scope->addVariable(RegVar);
|
Scope->addVariable(RegVar);
|
||||||
if (AbsDbgVariable) {
|
if (DV.getTag() != dwarf::DW_TAG_arg_variable)
|
||||||
DbgVariableToDbgInstMap[AbsDbgVariable] = MInsn;
|
DbgValueStartMap[MInsn] = RegVar;
|
||||||
VarToAbstractVarMap[RegVar] = AbsDbgVariable;
|
if (DbgVariable *AbsVar = findAbstractVariable(DV, MInsn->getDebugLoc())) {
|
||||||
|
DbgVariableToDbgInstMap[AbsVar] = MInsn;
|
||||||
|
VarToAbstractVarMap[RegVar] = AbsVar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue