summaryrefslogtreecommitdiffstats
path: root/clang/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
commitd6f1518cc905cffa641a0ced3be943664cb5e8e6 (patch)
tree8661cdd3bfe4ecba1a76ce8787881ee68f659fc6 /clang/lib/CodeGen/CGVTT.cpp
parent2050af838d717c1bc06fd1f340f8839c092e694a (diff)
downloadbcm5719-llvm-d6f1518cc905cffa641a0ced3be943664cb5e8e6.tar.gz
bcm5719-llvm-d6f1518cc905cffa641a0ced3be943664cb5e8e6.zip
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. llvm-svn: 131400
Diffstat (limited to 'clang/lib/CodeGen/CGVTT.cpp')
-rw-r--r--clang/lib/CodeGen/CGVTT.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGVTT.cpp b/clang/lib/CodeGen/CGVTT.cpp
index a6849f8f3d2..aefc41e5000 100644
--- a/clang/lib/CodeGen/CGVTT.cpp
+++ b/clang/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 =
OpenPOWER on IntegriCloud