mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Do not drop location info for inlined function args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2200,7 +2200,11 @@ void DwarfDebug::collectVariableInfo(const MachineFunction *MF) {
|
||||
}
|
||||
|
||||
DbgScope *Scope = findDbgScope(MInsn);
|
||||
if (!Scope && DV.getTag() == dwarf::DW_TAG_arg_variable)
|
||||
bool CurFnArg = false;
|
||||
if (DV.getTag() == dwarf::DW_TAG_arg_variable &&
|
||||
DISubprogram(DV.getContext()).describes(MF->getFunction()))
|
||||
CurFnArg = true;
|
||||
if (!Scope && CurFnArg)
|
||||
Scope = CurrentFnDbgScope;
|
||||
// If variable scope is not found then skip this variable.
|
||||
if (!Scope)
|
||||
@ -2209,7 +2213,7 @@ void DwarfDebug::collectVariableInfo(const MachineFunction *MF) {
|
||||
Processed.insert(DV);
|
||||
DbgVariable *RegVar = new DbgVariable(DV);
|
||||
Scope->addVariable(RegVar);
|
||||
if (DV.getTag() != dwarf::DW_TAG_arg_variable)
|
||||
if (!CurFnArg)
|
||||
DbgVariableLabelsMap[RegVar] = getLabelBeforeInsn(MInsn);
|
||||
if (DbgVariable *AbsVar = findAbstractVariable(DV, MInsn->getDebugLoc())) {
|
||||
DbgVariableToDbgInstMap[AbsVar] = MInsn;
|
||||
|
Reference in New Issue
Block a user