[cfe-commits] r128520 - /cfe/trunk/lib/CodeGen/CGVTables.cpp
Ken Dyck
kd at kendyck.com
Tue Mar 29 18:10:23 PDT 2011
Author: kjdyck
Date: Tue Mar 29 20:10:23 2011
New Revision: 128520
URL: http://llvm.org/viewvc/llvm-project?rev=128520&view=rev
Log:
Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()
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=128520&r1=128519&r2=128520&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Tue Mar 29 20:10:23 2011
@@ -1140,7 +1140,7 @@
/// DeterminePrimaryVirtualBases - Determine the primary virtual bases in this
/// class hierarchy.
void DeterminePrimaryVirtualBases(const CXXRecordDecl *RD,
- uint64_t OffsetInLayoutClass,
+ CharUnits OffsetInLayoutClass,
VisitedVirtualBasesSetTy &VBases);
/// LayoutVTablesForVirtualBases - Layout vtables for all virtual bases of the
@@ -1733,8 +1733,8 @@
VisitedVirtualBasesSetTy VBases;
// Determine the primary virtual bases.
- DeterminePrimaryVirtualBases(MostDerivedClass,
- Context.toBits(MostDerivedClassOffset), VBases);
+ DeterminePrimaryVirtualBases(MostDerivedClass, MostDerivedClassOffset,
+ VBases);
VBases.clear();
LayoutVTablesForVirtualBases(MostDerivedClass, VBases);
@@ -1879,7 +1879,7 @@
void
VTableBuilder::DeterminePrimaryVirtualBases(const CXXRecordDecl *RD,
- uint64_t OffsetInLayoutClass,
+ CharUnits OffsetInLayoutClass,
VisitedVirtualBasesSetTy &VBases) {
const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
@@ -1896,8 +1896,8 @@
const ASTRecordLayout &LayoutClassLayout =
Context.getASTRecordLayout(LayoutClass);
- uint64_t PrimaryBaseOffsetInLayoutClass =
- LayoutClassLayout.getVBaseClassOffsetInBits(PrimaryBase);
+ CharUnits PrimaryBaseOffsetInLayoutClass =
+ LayoutClassLayout.getVBaseClassOffset(PrimaryBase);
// We know that the base is not a primary base in the layout class if
// the base offsets are different.
@@ -1916,7 +1916,7 @@
const CXXRecordDecl *BaseDecl =
cast<CXXRecordDecl>(I->getType()->getAs<RecordType>()->getDecl());
- uint64_t BaseOffsetInLayoutClass;
+ CharUnits BaseOffsetInLayoutClass;
if (I->isVirtual()) {
if (!VBases.insert(BaseDecl))
@@ -1926,10 +1926,10 @@
Context.getASTRecordLayout(LayoutClass);
BaseOffsetInLayoutClass =
- LayoutClassLayout.getVBaseClassOffsetInBits(BaseDecl);
+ LayoutClassLayout.getVBaseClassOffset(BaseDecl);
} else {
BaseOffsetInLayoutClass =
- OffsetInLayoutClass + Layout.getBaseClassOffsetInBits(BaseDecl);
+ OffsetInLayoutClass + Layout.getBaseClassOffset(BaseDecl);
}
DeterminePrimaryVirtualBases(BaseDecl, BaseOffsetInLayoutClass, VBases);
More information about the cfe-commits
mailing list