[cfe-commits] r90535 - /cfe/trunk/lib/CodeGen/CGVtable.cpp

Anders Carlsson andersca at mac.com
Thu Dec 3 19:52:53 PST 2009


Author: andersca
Date: Thu Dec  3 21:52:52 2009
New Revision: 90535

URL: http://llvm.org/viewvc/llvm-project?rev=90535&view=rev
Log:
More work in preparation of getting rid of the submethods loop.

Modified:
    cfe/trunk/lib/CodeGen/CGVtable.cpp

Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=90535&r1=90534&r2=90535&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Thu Dec  3 21:52:52 2009
@@ -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;
     }





More information about the cfe-commits mailing list