diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 1eab6bb7ec8..5e8e30959c9 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -591,7 +591,8 @@ findInsertLocation(MachineBasicBlock *MBB, SlotIndex Idx, DebugLoc &DL,    // Don't insert anything after the first terminator.    MachineBasicBlock::iterator Term = MBB->getFirstTerminator(); -  if (Term != MBB->end() && Idx >= LIS.getInstructionIndex(Term)) { +  if (Term != MBB->end() && !LIS.isNotInMIMap(Term) && +      Idx >= LIS.getInstructionIndex(Term)) {      DL = Term->getDebugLoc();      return Term;    }  | 

