summaryrefslogtreecommitdiff
path: root/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-10-06 18:00:07 +0000
committerDan Gohman <gohman@apple.com>2008-10-06 18:00:07 +0000
commit4daa9071ed1afde7fb03c7e0198101f4806b7d11 (patch)
tree9f1fccfb7e0847055ce1f1146d4db14b17347bc6 /lib/CodeGen/VirtRegMap.cpp
parente4d4b8c53388643ade7081acc7f4d555b16e14aa (diff)
downloadllvm-4daa9071ed1afde7fb03c7e0198101f4806b7d11.tar.gz
llvm-4daa9071ed1afde7fb03c7e0198101f4806b7d11.tar.bz2
llvm-4daa9071ed1afde7fb03c7e0198101f4806b7d11.tar.xz
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
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--lib/CodeGen/VirtRegMap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index f03db74897..26d019b284 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;
}