summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-05-27 20:25:04 +0000
committerDevang Patel <dpatel@apple.com>2010-05-27 20:25:04 +0000
commit7a9dedf0aba80434f73f7b57e53c10e67a949077 (patch)
tree9dcdb458c160a4d91b1accec994937b97655996f /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent40e62dfdc03d1eb12b7d9961746d24383175ae96 (diff)
downloadbcm5719-llvm-7a9dedf0aba80434f73f7b57e53c10e67a949077.tar.gz
bcm5719-llvm-7a9dedf0aba80434f73f7b57e53c10e67a949077.zip
Do not drop location info for inlined function args.
llvm-svn: 104884
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 502da07c149..f975437e24f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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;
OpenPOWER on IntegriCloud