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

Ken Dyck kd at kendyck.com
Wed Mar 30 03:11:40 PDT 2011


Author: kjdyck
Date: Wed Mar 30 05:11:40 2011
New Revision: 128531

URL: http://llvm.org/viewvc/llvm-project?rev=128531&view=rev
Log:
Convert the offset parameter of
VCallAndVBaseOffsetBuilder::AddVCallOffsets() 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=128531&r1=128530&r2=128531&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Wed Mar 30 05:11:40 2011
@@ -746,7 +746,7 @@
                                uint64_t RealBaseOffset);
   
   /// AddVCallOffsets - Add vcall offsets for the given base subobject.
-  void AddVCallOffsets(BaseSubobject Base, uint64_t VBaseOffset);
+  void AddVCallOffsets(BaseSubobject Base, CharUnits VBaseOffset);
   
   /// AddVBaseOffsets - Add vbase offsets for the given class.
   void AddVBaseOffsets(const CXXRecordDecl *Base, uint64_t OffsetInLayoutClass);
@@ -825,7 +825,7 @@
 
   // We only want to add vcall offsets for virtual bases.
   if (BaseIsVirtual)
-    AddVCallOffsets(Base, RealBaseOffset);
+    AddVCallOffsets(Base, Context.toCharUnitsFromBits(RealBaseOffset));
 }
 
 int64_t VCallAndVBaseOffsetBuilder::getCurrentOffsetOffset() const {
@@ -843,7 +843,7 @@
 }
 
 void VCallAndVBaseOffsetBuilder::AddVCallOffsets(BaseSubobject Base, 
-                                                 uint64_t VBaseOffset) {
+                                                 CharUnits VBaseOffset) {
   const CXXRecordDecl *RD = Base.getBase();
   const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
 
@@ -885,7 +885,7 @@
       
       /// The vcall offset is the offset from the virtual base to the object 
       /// where the function was overridden.
-      Offset = Overrider.Offset - Context.toCharUnitsFromBits(VBaseOffset);
+      Offset = Overrider.Offset - VBaseOffset;
     }
     
     Components.push_back(





More information about the cfe-commits mailing list