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 | c7be3133a7438d16d32c98d532fe78143f4d8745 (patch) | |
| tree | b33b2a97cf496e1347401b0c805d049103ab2b3f /lib | |
| parent | bd37fe5279a6130e5756174e5d8c898b21a308ce (diff) | |
| download | external_llvm-c7be3133a7438d16d32c98d532fe78143f4d8745.zip external_llvm-c7be3133a7438d16d32c98d532fe78143f4d8745.tar.gz external_llvm-c7be3133a7438d16d32c98d532fe78143f4d8745.tar.bz2 | |
Do not require line number entry for undefined local variable.
This is a regression caused by r106792 and caught by gdb testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 50c0fea..5343ada 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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)) |
