[cfe-commits] r128516 - /cfe/trunk/lib/CodeGen/CGVTables.cpp
Ken Dyck
kd at kendyck.com
Tue Mar 29 17:50:28 PDT 2011
Author: kjdyck
Date: Tue Mar 29 19:50:28 2011
New Revision: 128516
URL: http://llvm.org/viewvc/llvm-project?rev=128516&view=rev
Log:
Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables 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=128516&r1=128515&r2=128516&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Tue Mar 29 19:50:28 2011
@@ -1135,7 +1135,7 @@
/// \param BaseIsMorallyVirtual whether the base subobject is a virtual base
/// or a direct or indirect base of a virtual base.
void LayoutSecondaryVTables(BaseSubobject Base, bool BaseIsMorallyVirtual,
- uint64_t OffsetInLayoutClass);
+ CharUnits OffsetInLayoutClass);
/// DeterminePrimaryVirtualBases - Determine the primary virtual bases in this
/// class hierarchy.
@@ -1815,13 +1815,12 @@
}
// Layout secondary vtables.
- LayoutSecondaryVTables(Base, BaseIsMorallyVirtual,
- Context.toBits(OffsetInLayoutClass));
+ LayoutSecondaryVTables(Base, BaseIsMorallyVirtual, OffsetInLayoutClass);
}
void VTableBuilder::LayoutSecondaryVTables(BaseSubobject Base,
bool BaseIsMorallyVirtual,
- uint64_t OffsetInLayoutClass) {
+ CharUnits OffsetInLayoutClass) {
// Itanium C++ ABI 2.5.2:
// Following the primary virtual table of a derived class are secondary
// virtual tables for each of its proper base classes, except any primary
@@ -1859,14 +1858,13 @@
CharUnits BaseOffset = Base.getBaseOffset() + RelativeBaseOffset;
CharUnits BaseOffsetInLayoutClass =
- Context.toCharUnitsFromBits(OffsetInLayoutClass) + RelativeBaseOffset;
+ OffsetInLayoutClass + RelativeBaseOffset;
// Don't emit a secondary vtable for a primary base. We might however want
// to emit secondary vtables for other bases of this base.
if (BaseDecl == PrimaryBase) {
- LayoutSecondaryVTables(
- BaseSubobject(BaseDecl, BaseOffset),
- BaseIsMorallyVirtual, Context.toBits(BaseOffsetInLayoutClass));
+ LayoutSecondaryVTables(BaseSubobject(BaseDecl, BaseOffset),
+ BaseIsMorallyVirtual, BaseOffsetInLayoutClass);
continue;
}
More information about the cfe-commits
mailing list