summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGVTT.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-05-16 04:08:36 +0000
committerAnders Carlsson <andersca@mac.com>2011-05-16 04:08:36 +0000
commite3d6cf2149beb1c215ea6e87023c27b4f37712ad (patch)
tree8dac9c1cbee436b7aff5d567a3aae0d32869d6e3 /lib/CodeGen/CGVTT.cpp
parentcb63e07c588dc7030f3f41812dea73f3571e449a (diff)
Fix another regression from the "skip vtable pointer initialization"
optimization. Make sure to require a vtable when trying to get the address of a VTT, otherwise we would never end up emitting the VTT. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTT.cpp')
-rw-r--r--lib/CodeGen/CGVTT.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGVTT.cpp b/lib/CodeGen/CGVTT.cpp
index a6849f8f3d..aefc41e500 100644
--- a/lib/CodeGen/CGVTT.cpp
+++ b/lib/CodeGen/CGVTT.cpp
@@ -411,6 +411,8 @@ llvm::GlobalVariable *CodeGenVTables::GetAddrOfVTT(const CXXRecordDecl *RD) {
Out.flush();
llvm::StringRef Name = OutName.str();
+ ComputeVTableRelatedInformation(RD, /*VTableRequired=*/true);
+
VTTBuilder Builder(CGM, RD, /*GenerateDefinition=*/false);
const llvm::Type *Int8PtrTy =