[cfe-commits] r128598 - /cfe/trunk/lib/CodeGen/CGVTables.cpp

Ken Dyck kd at kendyck.com
Wed Mar 30 17:48:04 PDT 2011


Author: kjdyck
Date: Wed Mar 30 19:48:04 2011
New Revision: 128598

URL: http://llvm.org/viewvc/llvm-project?rev=128598&view=rev
Log:
Convert the OffsetInLayoutClass of the VCallAndVBaseOffsetBuilder
constructor to CharUnits. No change in functionality intended.

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

Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.cpp?rev=128598&r1=128597&r2=128598&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Wed Mar 30 19:48:04 2011
@@ -760,13 +760,12 @@
                              const CXXRecordDecl *LayoutClass,
                              const FinalOverriders *Overriders,
                              BaseSubobject Base, bool BaseIsVirtual,
-                             uint64_t OffsetInLayoutClass)
+                             CharUnits OffsetInLayoutClass)
     : MostDerivedClass(MostDerivedClass), LayoutClass(LayoutClass), 
     Context(MostDerivedClass->getASTContext()), Overriders(Overriders) {
       
     // Add vcall and vbase offsets.
-    AddVCallAndVBaseOffsets(Base, BaseIsVirtual, 
-                            Context.toCharUnitsFromBits(OffsetInLayoutClass));
+    AddVCallAndVBaseOffsets(Base, BaseIsVirtual, OffsetInLayoutClass);
   }
   
   /// Methods for iterating over the components.
@@ -1434,7 +1433,8 @@
                                          BaseSubobject(Offset.VirtualBase,
                                                        CharUnits::Zero()),
                                          /*BaseIsVirtual=*/true,
-                                         /*OffsetInLayoutClass=*/0);
+                                         /*OffsetInLayoutClass=*/
+                                             CharUnits::Zero());
         
       VCallOffsets = Builder.getVCallOffsets();
     }
@@ -1751,7 +1751,7 @@
   // Add vcall and vbase offsets for this vtable.
   VCallAndVBaseOffsetBuilder Builder(MostDerivedClass, LayoutClass, &Overriders,
                                      Base, BaseIsVirtualInLayoutClass, 
-                                     Context.toBits(OffsetInLayoutClass));
+                                     OffsetInLayoutClass);
   Components.append(Builder.components_begin(), Builder.components_end());
   
   // Check if we need to add these vcall offsets.
@@ -2434,7 +2434,7 @@
   VCallAndVBaseOffsetBuilder Builder(RD, RD, /*FinalOverriders=*/0,
                                      BaseSubobject(RD, CharUnits::Zero()),
                                      /*BaseIsVirtual=*/false,
-                                     /*OffsetInLayoutClass=*/0);
+                                     /*OffsetInLayoutClass=*/CharUnits::Zero());
 
   for (VCallAndVBaseOffsetBuilder::VBaseOffsetOffsetsMapTy::const_iterator I =
        Builder.getVBaseOffsetOffsets().begin(), 





More information about the cfe-commits mailing list