fix off-by one
authorChris Lattner <sabre@nondot.org>
Mon, 23 Apr 2007 21:23:41 +0000 (21:23 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 23 Apr 2007 21:23:41 +0000 (21:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36377 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bitcode/Writer/ValueEnumerator.h

index f407a267931f4520117523f7fbad51c2c20a68bf..89f64f43063c00106ade078a87ac016cc593fbb8 100644 (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 {