diff options
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 0565a7fef90..b4c375d638a 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/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;  | 

