[llvm-commits] [llvm] r104302 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Devang Patel
dpatel at apple.com
Thu May 20 17:10:20 PDT 2010
Author: dpatel
Date: Thu May 20 19:10:20 2010
New Revision: 104302
URL: http://llvm.org/viewvc/llvm-project?rev=104302&view=rev
Log:
Simplify.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=104302&r1=104301&r2=104302&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu May 20 19:10:20 2010
@@ -2145,30 +2145,22 @@
if (Processed.count(DV) != 0)
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);
+ if (!Scope && DV.getTag() == dwarf::DW_TAG_arg_variable)
+ Scope = CurrentFnDbgScope;
// If variable scope is not found then skip this variable.
- if (Scope == 0)
+ if (!Scope)
continue;
Processed.insert(DV);
- DbgVariable *AbsDbgVariable = findAbstractVariable(DV, MInsn->getDebugLoc());
DbgVariable *RegVar = new DbgVariable(DV);
- DbgValueStartMap[MInsn] = RegVar;
DbgVariableToDbgInstMap[RegVar] = MInsn;
Scope->addVariable(RegVar);
- if (AbsDbgVariable) {
- DbgVariableToDbgInstMap[AbsDbgVariable] = MInsn;
- VarToAbstractVarMap[RegVar] = AbsDbgVariable;
+ if (DV.getTag() != dwarf::DW_TAG_arg_variable)
+ DbgValueStartMap[MInsn] = RegVar;
+ if (DbgVariable *AbsVar = findAbstractVariable(DV, MInsn->getDebugLoc())) {
+ DbgVariableToDbgInstMap[AbsVar] = MInsn;
+ VarToAbstractVarMap[RegVar] = AbsVar;
}
}
More information about the llvm-commits
mailing list