diff options
author | Anders Carlsson <andersca@mac.com> | 2010-04-10 21:35:33 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-04-10 21:35:33 +0000 |
commit | 573021fc10d0668a9d59888bdfc259e3a304b405 (patch) | |
tree | 0776873cbceb7aea325883878f09bb74e6de3eac /lib | |
parent | a1e87162d36f94d3dc58ff3f0743d6026635a0c6 (diff) |
Fix another vbase layout bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/RecordLayoutBuilder.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index b2426833a2..2bc2a128f4 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -263,8 +263,12 @@ ASTRecordLayoutBuilder::LayoutVirtualBases(const CXXRecordDecl *RD, uint64_t BaseOffset; if (I->isVirtual()) { + // If we don't know this vbase yet, don't visit it. It will be visited + // later. + if (!VBases.count(Base)) + continue; + // We want the vbase offset from the class we're currently laying out. - assert(VBases.count(Base) && "Did not find virtual base!"); BaseOffset = VBases[Base]; } else if (RD == MostDerivedClass) { // We want the base offset from the class we're currently laying out. |