diff options
| author | Anders Carlsson <andersca@mac.com> | 2010-02-23 02:47:31 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2010-02-23 02:47:31 +0000 |
| commit | 30f5301e5440c4419329315f545242b55ddfe5e6 (patch) | |
| tree | 0e0b1b7e673cb438e5bc131900eb281997e49757 /clang/lib | |
| parent | 8ad777dc75acd5ae18f280a1077c45c33ea0ed3d (diff) | |
| download | bcm5719-llvm-30f5301e5440c4419329315f545242b55ddfe5e6.tar.gz bcm5719-llvm-30f5301e5440c4419329315f545242b55ddfe5e6.zip | |
More work on vcall offsets. We now emit the right number of vcall offsets in my local test case, but not the right values.
llvm-svn: 96874
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGVtable.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index b49128caaeb..d8ecd0c4e5a 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/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); |

