From: Dan Gohman Date: Mon, 6 Oct 2008 18:00:07 +0000 (+0000) Subject: Don't dereference the end() iterator. Thanks to X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4daa9071ed1afde7fb03c7e0198101f4806b7d11;p=oota-llvm.git Don't dereference the end() iterator. Thanks to ENABLE_EXPENSIVE_CHECKS for finding this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57181 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index f03db748973..26d019b2841 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/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; }