From a6ada9f725b0015c419a7ef661e833f9e9b26ff8 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Thu, 13 Jan 2011 21:28:55 +0000 Subject: [PATCH] Temporary workaround for an i386 crash in LiveDebugVariables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123400 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveDebugVariables.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/LiveDebugVariables.cpp b/lib/CodeGen/LiveDebugVariables.cpp index 1eab6bb7ec8..5e8e30959c9 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; }