diff options
author | Devang Patel <dpatel@apple.com> | 2010-06-24 21:51:19 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-06-24 21:51:19 +0000 |
commit | 486ca764216fea073d3bcc0716b181ca861b74f7 (patch) | |
tree | ddca3ccdbca772fc9c4ebb110dc73434149217a9 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 67674e2685af8ab16292550becac15f7b17ea831 (diff) |
DBG_VALUE machine instruction pointing to undefined register for a variable justify a separate scope if the variable is inlined function's argument.
Radar 8122864.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 89993ae9fd..abd42dcdf4 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2390,8 +2390,6 @@ DbgScope *DwarfDebug::getOrCreateDbgScope(const MDNode *Scope, const MDNode *Inl static bool hasValidLocation(LLVMContext &Ctx, const MachineInstr *MInsn, const MDNode *&Scope, const MDNode *&InlinedAt) { - if (MInsn->isDebugValue()) - return false; DebugLoc DL = MInsn->getDebugLoc(); if (DL.isUnknown()) return false; @@ -2655,7 +2653,6 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { assert (MI->getNumOperands() > 1 && "Invalid machine instruction!"); DIVariable DV(MI->getOperand(MI->getNumOperands() - 1).getMetadata()); if (!DV.Verify()) continue; - if (isDbgValueInUndefinedReg(MI)) continue; // If DBG_VALUE is for a local variable then it needs a label. if (DV.getTag() != dwarf::DW_TAG_arg_variable) InsnNeedsLabel.insert(MI); @@ -2663,7 +2660,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { else if (!DISubprogram(DV.getContext()).describes(MF->getFunction())) InsnNeedsLabel.insert(MI); // DBG_VALUE indicating argument location change needs a label. - else if (!ProcessedArgs.insert(DV)) + else if (isDbgValueInUndefinedReg(MI) == false && !ProcessedArgs.insert(DV)) InsnNeedsLabel.insert(MI); } else { // If location is unknown then instruction needs a location only if |