[cfe-commits] r96874 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Anders Carlsson
andersca at mac.com
Mon Feb 22 18:47:31 PST 2010
Author: andersca
Date: Mon Feb 22 20:47:31 2010
New Revision: 96874
URL: http://llvm.org/viewvc/llvm-project?rev=96874&view=rev
Log:
More work on vcall offsets. We now emit the right number of vcall offsets in my local test case, but not the right values.
Modified:
cfe/trunk/lib/CodeGen/CGVtable.cpp
Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=96874&r1=96873&r2=96874&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Mon Feb 22 20:47:31 2010
@@ -1106,7 +1106,7 @@
int64_t OffsetToTop = -(int64_t)Base.getBaseOffset() / 8;
AddVBaseOffsets(Base.getBase(), OffsetToTop, VBases);
- // We only want to add vcall offsets for virtual bases in secondary vtables.
+ // We only want to add vcall offsets for virtual bases.
if (BaseIsVirtual && OffsetToTop != 0)
AddVCallOffsets(Base);
}
@@ -1183,10 +1183,6 @@
const CXXRecordDecl *BaseDecl =
cast<CXXRecordDecl>(I->getType()->getAs<RecordType>()->getDecl());
- // Ignore the primary base.
- if (BaseDecl == PrimaryBase)
- continue;
-
// Get the base offset of this base.
uint64_t BaseOffset = Base.getBaseOffset() +
Layout.getBaseClassOffset(BaseDecl);
More information about the cfe-commits
mailing list