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

Ken Dyck kd at kendyck.com
Tue Mar 29 18:14:22 PDT 2011


Author: kjdyck
Date: Tue Mar 29 20:14:22 2011
New Revision: 128521

URL: http://llvm.org/viewvc/llvm-project?rev=128521&view=rev
Log:
Convert a local offset variable 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=128521&r1=128520&r2=128521&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Tue Mar 29 20:14:22 2011
@@ -1954,8 +1954,8 @@
         !PrimaryVirtualBases.count(BaseDecl) && VBases.insert(BaseDecl)) {
       const ASTRecordLayout &MostDerivedClassLayout =
         Context.getASTRecordLayout(MostDerivedClass);
-      uint64_t BaseOffset = 
-        MostDerivedClassLayout.getVBaseClassOffsetInBits(BaseDecl);
+      CharUnits BaseOffset = 
+        MostDerivedClassLayout.getVBaseClassOffset(BaseDecl);
       
       const ASTRecordLayout &LayoutClassLayout =
         Context.getASTRecordLayout(LayoutClass);
@@ -1963,7 +1963,7 @@
         LayoutClassLayout.getVBaseClassOffset(BaseDecl);
 
       LayoutPrimaryAndSecondaryVTables(
-        BaseSubobject(BaseDecl, Context.toCharUnitsFromBits(BaseOffset)),
+        BaseSubobject(BaseDecl, BaseOffset),
         /*BaseIsMorallyVirtual=*/true,
         /*BaseIsVirtualInLayoutClass=*/true,
         BaseOffsetInLayoutClass);





More information about the cfe-commits mailing list