diff options
author | Anders Carlsson <andersca@mac.com> | 2010-03-10 19:15:26 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-03-10 19:15:26 +0000 |
commit | f2c98ce9819cb7688a86e308f82ee896694a10e5 (patch) | |
tree | 062a2a01efc6b91bce9f86753f60d9b8702546f5 /lib/CodeGen/CGVtable.cpp | |
parent | 957a2b7b227c3558b18ed5f59ddda1a02aea880e (diff) |
Ignore non-interesting bases when emitting construction vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 4500ec033c..caf1e1f93e 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -1800,6 +1800,17 @@ void VtableBuilder::LayoutSecondaryVtables(BaseSubobject Base, if (!BaseDecl->isDynamicClass()) continue; + if (isBuildingConstructorVtable()) { + // Itanium C++ ABI 2.6.4: + // Some of the base class subobjects may not need construction virtual + // tables, which will therefore not be present in the construction + // virtual table group, even though the subobject virtual tables are + // present in the main virtual table group for the complete object. + if (!BaseDecl->getNumVBases()) { + continue; + } + } + // Get the base offset of this base. uint64_t RelativeBaseOffset = Layout.getBaseClassOffset(BaseDecl); uint64_t BaseOffset = Base.getBaseOffset() + RelativeBaseOffset; |