diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-03 06:30:58 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-03 06:30:58 +0000 |
commit | 01de7a44cea9f77cbcda65faad8edc8b48a3b617 (patch) | |
tree | e2c42d9af61c356882440b5fb64907aedc769ef5 /lib/Sema/SemaDeclCXX.cpp | |
parent | 7a17889829b3f3655c47e2b01e282832fdb466d6 (diff) |
Revert 124768.
This reopens PR99114, but that one at least can be avoided with an #include.
PR9130 cannot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 0565a7fef9..b4c375d638 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -7118,6 +7118,13 @@ bool Sema::DefineUsedVTables() { switch (KeyFunction->getTemplateSpecializationKind()) { case TSK_Undeclared: case TSK_ExplicitSpecialization: + // The key function is in another translation unit. Mark all of the + // virtual members of this class as referenced so that we can build a + // vtable anyway (in order to do devirtualization when optimizations + // are turned on for example. + MarkVirtualMembersReferenced(Loc, Class); + continue; + case TSK_ExplicitInstantiationDeclaration: // The key function is in another translation unit. continue; |