diff options
author | Anders Carlsson <andersca@mac.com> | 2010-03-11 05:48:21 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-03-11 05:48:21 +0000 |
commit | e02fc0ac5b24b08a32267966ca50c2f39ee52739 (patch) | |
tree | 07b2f5d6be558928e6535394e739e3d58ab1172f /lib/CodeGen/CGVtable.cpp | |
parent | 37147ea14f39a8522e32e3ba4d043a2a33fff90c (diff) |
Run the new vtable builder for construction vtables as well now. Note that we still don't use the data it generates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 5b9c976d38..b500f4d113 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -3429,20 +3429,17 @@ CGVtableInfo::GenerateVtable(llvm::GlobalVariable::LinkageTypes Linkage, if (GenerateDefinition) { if (LayoutClass == RD) { assert(!IsVirtual && - "Can't only have a virtual base in construction vtables!"); - VtableBuilder Builder(*this, RD, Offset, - /*MostDerivedClassIsVirtual=*/false, - LayoutClass); - - if (CGM.getLangOptions().DumpVtableLayouts) - Builder.dumpLayout(llvm::errs()); - } else if (CGM.getLangOptions().DumpVtableLayouts) { - // We only build construction vtables when dumping vtable layouts for now. - VtableBuilder Builder(*this, RD, Offset, - /*MostDerivedClassIsVirtual=*/IsVirtual, - LayoutClass); - Builder.dumpLayout(llvm::errs()); + "Can only have a virtual base in construction vtables!"); + assert(!Offset && + "Can only have a base offset in construction vtables!"); } + + VtableBuilder Builder(*this, RD, Offset, + /*MostDerivedClassIsVirtual=*/false, + LayoutClass); + + if (CGM.getLangOptions().DumpVtableLayouts) + Builder.dumpLayout(llvm::errs()); } llvm::SmallString<256> OutName; |