aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r--lib/CodeGen/LiveDebugVariables.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveDebugVariables.cpp b/lib/CodeGen/LiveDebugVariables.cpp
index 1eab6bb7ec..5e8e30959c 100644
--- a/lib/CodeGen/LiveDebugVariables.cpp
+++ b/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;
}