TypeIds are indexed by j, not i
authorAnton Korobeynikov <asl@math.spbu.ru>
Thu, 10 May 2007 15:10:34 +0000 (15:10 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Thu, 10 May 2007 15:10:34 +0000 (15:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36974 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DwarfWriter.cpp

index 52b405cda1a6f092f564dc2028af1fa884bc26ff..73ec4efba781dbb9c24763f712273210312532c0 100644 (file)
@@ -2948,7 +2948,7 @@ private:
       } else {
         // Gather the action sizes
         for (unsigned j = 0, M = TypeIds.size(); j != M; ++j) {
-          unsigned TypeID = TypeIds[i];
+          unsigned TypeID = TypeIds[j];
           unsigned SizeTypeID = Asm->SizeSLEB128(TypeID);
           signed Action = j ? -(SizeAction + SizeTypeID) : 0;
           SizeAction = SizeTypeID + Asm->SizeSLEB128(Action);