From dfe979bcb0d98c64782bdb3e3bbd4d4733c0026b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 6 Oct 2008 18:00:07 +0000 Subject: Don't dereference the end() iterator. Thanks to ENABLE_EXPENSIVE_CHECKS for finding this. llvm-svn: 57181 --- llvm/lib/CodeGen/VirtRegMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib') diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp index f03db748973..26d019b2841 100644 --- a/llvm/lib/CodeGen/VirtRegMap.cpp +++ b/llvm/lib/CodeGen/VirtRegMap.cpp @@ -143,7 +143,7 @@ int VirtRegMap::getEmergencySpillSlot(const TargetRegisterClass *RC) { LowSpillSlot = SS; if (HighSpillSlot == NO_STACK_SLOT || SS > HighSpillSlot) HighSpillSlot = SS; - I->second = SS; + EmergencySpillSlots[RC] = SS; return SS; } -- cgit v1.2.3