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

Ken Dyck kd at kendyck.com
Wed Mar 30 17:37:24 PDT 2011


Author: kjdyck
Date: Wed Mar 30 19:37:24 2011
New Revision: 128596

URL: http://llvm.org/viewvc/llvm-project?rev=128596&view=rev
Log:
Convert the RealBaseOffset parameter of
VCallAndVBaseOffsetBuilder::AddVCallAndVBaseOffsets() 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=128596&r1=128595&r2=128596&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Wed Mar 30 19:37:24 2011
@@ -743,7 +743,7 @@
   /// AddVCallAndVBaseOffsets - Add vcall offsets and vbase offsets for the
   /// given base subobject.
   void AddVCallAndVBaseOffsets(BaseSubobject Base, bool BaseIsVirtual,
-                               uint64_t RealBaseOffset);
+                               CharUnits RealBaseOffset);
   
   /// AddVCallOffsets - Add vcall offsets for the given base subobject.
   void AddVCallOffsets(BaseSubobject Base, CharUnits VBaseOffset);
@@ -765,7 +765,8 @@
     Context(MostDerivedClass->getASTContext()), Overriders(Overriders) {
       
     // Add vcall and vbase offsets.
-    AddVCallAndVBaseOffsets(Base, BaseIsVirtual, OffsetInLayoutClass);
+    AddVCallAndVBaseOffsets(Base, BaseIsVirtual, 
+                            Context.toCharUnitsFromBits(OffsetInLayoutClass));
   }
   
   /// Methods for iterating over the components.
@@ -782,7 +783,7 @@
 void 
 VCallAndVBaseOffsetBuilder::AddVCallAndVBaseOffsets(BaseSubobject Base,
                                                     bool BaseIsVirtual,
-                                                    uint64_t RealBaseOffset) {
+                                                    CharUnits RealBaseOffset) {
   const ASTRecordLayout &Layout = Context.getASTRecordLayout(Base.getBase());
   
   // Itanium C++ ABI 2.5.2:
@@ -821,11 +822,11 @@
       PrimaryBaseIsVirtual, RealBaseOffset);
   }
 
-  AddVBaseOffsets(Base.getBase(), RealBaseOffset);
+  AddVBaseOffsets(Base.getBase(), Context.toBits(RealBaseOffset));
 
   // We only want to add vcall offsets for virtual bases.
   if (BaseIsVirtual)
-    AddVCallOffsets(Base, Context.toCharUnitsFromBits(RealBaseOffset));
+    AddVCallOffsets(Base, RealBaseOffset);
 }
 
 int64_t VCallAndVBaseOffsetBuilder::getCurrentOffsetOffset() const {





More information about the cfe-commits mailing list