More work in preparation of getting rid of the submethods loop.

llvm-svn: 90535
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index defa809..4cf158a 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/lib/CodeGen/CGVtable.cpp
@@ -754,7 +754,9 @@
       if (submethods[i] != om)
         continue;
 
-      assert(i == Methods.getIndex(OGD));
+      uint64_t Index = Methods.getIndex(OGD);
+
+      assert(i == Index);
       
       QualType ReturnType = 
         MD->getType()->getAs<FunctionType>()->getResultType();
@@ -778,7 +780,7 @@
 
       Methods.OverrideMethod(OGD, GD);
 
-      submethods[i] = m;
+      submethods[Index] = m;
       ThisAdjustments.erase(i);
       if (MorallyVirtual || VCall.count(OGD)) {
         Index_t &idx = VCall[OGD];
@@ -811,7 +813,7 @@
                                        VirtualAdjustment);
 
         if (!isPure && !ThisAdjustment.isEmpty())
-          ThisAdjustments[i] = ThisAdjustment;
+          ThisAdjustments[Index] = ThisAdjustment;
         return true;
       }
 
@@ -822,7 +824,7 @@
         ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0);
         
         if (!isPure)
-          ThisAdjustments[i] = ThisAdjustment;
+          ThisAdjustments[Index] = ThisAdjustment;
       }
       return true;
     }