[llvm-commits] [llvm] r107430 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Devang Patel
dpatel at apple.com
Thu Jul 1 14:38:08 PDT 2010
Author: dpatel
Date: Thu Jul 1 16:38:08 2010
New Revision: 107430
URL: http://llvm.org/viewvc/llvm-project?rev=107430&view=rev
Log:
Do not require line number entry for undefined local variable.
This is a regression caused by r106792 and caught by gdb testsuite.
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=107430&r1=107429&r2=107430&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Jul 1 16:38:08 2010
@@ -2690,10 +2690,12 @@
DIVariable DV(MI->getOperand(MI->getNumOperands() - 1).getMetadata());
if (!DV.Verify()) continue;
// If DBG_VALUE is for a local variable then it needs a label.
- if (DV.getTag() != dwarf::DW_TAG_arg_variable)
+ if (DV.getTag() != dwarf::DW_TAG_arg_variable
+ && isDbgValueInUndefinedReg(MI) == false)
InsnNeedsLabel.insert(MI);
// DBG_VALUE for inlined functions argument needs a label.
- else if (!DISubprogram(DV.getContext()).describes(MF->getFunction()))
+ else if (!DISubprogram(getDISubprogram(DV.getContext())).
+ describes(MF->getFunction()))
InsnNeedsLabel.insert(MI);
// DBG_VALUE indicating argument location change needs a label.
else if (isDbgValueInUndefinedReg(MI) == false && !ProcessedArgs.insert(DV))
More information about the llvm-commits
mailing list