aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVtable.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-02-23 02:47:31 +0000
committerAnders Carlsson <andersca@mac.com>2010-02-23 02:47:31 +0000
commita455c807c8d34e5ecfa32280b262bbbac427cc5b (patch)
tree3f0a8cf81a434dd895b5370fb34d174c1fda6769 /lib/CodeGen/CGVtable.cpp
parent3d2eed823d534ee370cfd7742c1e96ab3ee9a80b (diff)
More work on vcall offsets. We now emit the right number of vcall offsets in my local test case, but not the right values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r--lib/CodeGen/CGVtable.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index b49128caae..d8ecd0c4e5 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -1106,7 +1106,7 @@ VtableBuilder::AddVCallAndVBaseOffsets(BaseSubobject Base,
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 @@ void VtableBuilder::AddVCallOffsets(BaseSubobject Base) {
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);