]> granicus.if.org Git - clang/commitdiff
Convert a local offset variable to CharUnits. No change in functionality
authorKen Dyck <kd@kendyck.com>
Wed, 30 Mar 2011 01:14:22 +0000 (01:14 +0000)
committerKen Dyck <kd@kendyck.com>
Wed, 30 Mar 2011 01:14:22 +0000 (01:14 +0000)
intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128521 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVTables.cpp

index b42c9fb613760faa642ec94a7d94531ee998b56f..ac27ab8c6e22ed84cb4623a6b97982505f991930 100644 (file)
@@ -1954,8 +1954,8 @@ VTableBuilder::LayoutVTablesForVirtualBases(const CXXRecordDecl *RD,
         !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 @@ VTableBuilder::LayoutVTablesForVirtualBases(const CXXRecordDecl *RD,
         LayoutClassLayout.getVBaseClassOffset(BaseDecl);
 
       LayoutPrimaryAndSecondaryVTables(
-        BaseSubobject(BaseDecl, Context.toCharUnitsFromBits(BaseOffset)),
+        BaseSubobject(BaseDecl, BaseOffset),
         /*BaseIsMorallyVirtual=*/true,
         /*BaseIsVirtualInLayoutClass=*/true,
         BaseOffsetInLayoutClass);