diff options
author | Anders Carlsson <andersca@mac.com> | 2010-02-25 22:18:35 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-02-25 22:18:35 +0000 |
commit | bf554f63bffa7db32b5f343f6fd075501b97d401 (patch) | |
tree | 6bed498fc683015d1823303b8cf64e8caa70ccf7 /lib/CodeGen/CGVtable.cpp | |
parent | 9ad1c0205ec478d64b3ed6d3dde5efaa9c9932c5 (diff) |
Fux a bug where we were trying to add overriders for non-virtual bases of virtual bases more than once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97173 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 5ebe816068..a6b8eb6d3d 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -261,10 +261,10 @@ static BaseOffset ComputeBaseOffset(ASTContext &Context, // Check the base class offset. const ASTRecordLayout &Layout = Context.getASTRecordLayout(Element.Class); - + const RecordType *BaseType = Element.Base->getType()->getAs<RecordType>(); const CXXRecordDecl *Base = cast<CXXRecordDecl>(BaseType->getDecl()); - + NonVirtualOffset += Layout.getBaseClassOffset(Base); } @@ -512,7 +512,7 @@ void FinalOverriders::ComputeFinalOverriders(BaseSubobject Base, if (!BaseDecl->isPolymorphic()) continue; - bool IsVisitedVirtualBase = false; + bool IsVisitedVirtualBase = BaseSubobjectIsVisitedVBase; uint64_t BaseOffset; if (I->isVirtual()) { if (!VisitedVirtualBases.insert(BaseDecl)) |