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 | bae46277fe0a00b36f7932fbfbdfb5e1dbd94204 (patch) | |
| tree | 13968b8e91f2bcf6d708547414527da9237bae3b /clang/lib | |
| parent | 510d22d0978fd0bc2cb4c91a09460ecd5f14b655 (diff) | |
| download | bcm5719-llvm-bae46277fe0a00b36f7932fbfbdfb5e1dbd94204.tar.gz bcm5719-llvm-bae46277fe0a00b36f7932fbfbdfb5e1dbd94204.zip | |
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.
llvm-svn: 96880
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 52e82d9669a..93cd42c9f56 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/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); |

