diff options
author | Anders Carlsson <andersca@mac.com> | 2010-02-23 03:26:17 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-02-23 03:26:17 +0000 |
commit | 92f54325673f2708d911ae3d8a95d77e21b06e37 (patch) | |
tree | cd4da9725a44522935d5d0fc46754f1546f536a7 /lib/CodeGen/CGVtable.cpp | |
parent | cc6bcbb8a77aec056d29f1843b636841ae2a629c (diff) |
Always emit vcall offset for the primary base, not only if it's virtual. Remove a debug printf, and add the test case that now passes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 52e82d9669..93cd42c9f5 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -1112,15 +1112,11 @@ VtableBuilder::AddVCallAndVBaseOffsets(BaseSubobject Base, } void VtableBuilder::AddVCallOffsets(BaseSubobject Base, uint64_t VBaseOffset) { - printf("adding call offsets for (%s, %llu) vbase offset %llu\n", - Base.getBase()->getQualifiedNameAsString().c_str(), - Base.getBaseOffset(), VBaseOffset); const CXXRecordDecl *RD = Base.getBase(); const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD); // Handle the primary base first. - const CXXRecordDecl *PrimaryBase = Layout.getPrimaryBase(); - if (PrimaryBase && Layout.getPrimaryBaseWasVirtual()) { + if (const CXXRecordDecl *PrimaryBase = Layout.getPrimaryBase()) { // Get the base offset of the primary base. uint64_t PrimaryBaseOffset = Base.getBaseOffset() + Layout.getBaseClassOffset(PrimaryBase); |