fix off-by one

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-04-23 21:23:41 +00:00
parent 4f6e9ab3d7
commit 8c99a8e768

View File

@ -54,7 +54,7 @@ public:
unsigned getValueID(const Value *V) const {
ValueMapType::const_iterator I = ValueMap.find(V);
assert(I != ValueMap.end() && "Value not in slotcalculator!");
return I->second;
return I->second-1;
}
unsigned getTypeID(const Type *T) const {