From 7262e90a10a65d50350465e831ff3df75d86a454 Mon Sep 17 00:00:00 2001 From: Ken Dyck Date: Wed, 30 Mar 2011 01:14:22 +0000 Subject: [PATCH] Convert a local offset variable to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128521 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGVTables.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index b42c9fb613..ac27ab8c6e 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -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); -- 2.40.0