diff options
| author | Devang Patel <dpatel@apple.com> | 2010-07-01 21:38:08 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2010-07-01 21:38:08 +0000 |
| commit | 429397529af4ffc853ea7bc6dcac42d5aeac6cb0 (patch) | |
| tree | 976b87027901f9b3d2752725c63f67fb8acc37e6 | |
| parent | 8453ddb5fed2d04e12824e92a0bd2cc66091bb4c (diff) | |
| download | bcm5719-llvm-429397529af4ffc853ea7bc6dcac42d5aeac6cb0.tar.gz bcm5719-llvm-429397529af4ffc853ea7bc6dcac42d5aeac6cb0.zip | |
Do not require line number entry for undefined local variable.
This is a regression caused by r106792 and caught by gdb testsuite.
llvm-svn: 107430
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 50c0feac091..5343adaa7a2 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2690,10 +2690,12 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { 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)) |

