summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTables.cpp
diff options
context:
space:
mode:
authorPiotr Padlewski <piotr.padlewski@gmail.com>2017-06-01 08:04:05 +0000
committerPiotr Padlewski <piotr.padlewski@gmail.com>2017-06-01 08:04:05 +0000
commitd3b1cbd17fb4b4be18f84cb30d7cb6d9c5e205d6 (patch)
treee4340fb4030bead69cfc4be12f99278d8b14db9a /clang/lib/CodeGen/CGVTables.cpp
parentd602987271add15aac3d6d3c751a219f7b30e067 (diff)
downloadbcm5719-llvm-d3b1cbd17fb4b4be18f84cb30d7cb6d9c5e205d6.tar.gz
bcm5719-llvm-d3b1cbd17fb4b4be18f84cb30d7cb6d9c5e205d6.zip
Emit available_externally vtables opportunistically
Summary: We can emit vtable definition having inline function if they are all emitted. Reviewers: rjmccall, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33437 llvm-svn: 304394
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r--clang/lib/CodeGen/CGVTables.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index 1869c0e809d..64b6d0d3fe9 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -901,6 +901,8 @@ void CodeGenModule::EmitDeferredVTables() {
for (const CXXRecordDecl *RD : DeferredVTables)
if (shouldEmitVTableAtEndOfTranslationUnit(*this, RD))
VTables.GenerateClassData(RD);
+ else if (shouldOpportunisticallyEmitVTables())
+ OpportunisticVTables.push_back(RD);
assert(savedSize == DeferredVTables.size() &&
"deferred extra vtables during vtable emission?");
OpenPOWER on IntegriCloud