diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-03 07:51:34 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-03 07:51:34 +0000 | 
| commit | 2c56c396ce5990954f85194029eeb391bc3529ff (patch) | |
| tree | 1e9c2f464daf7966d11aa31cf069fa1bc63fdb21 /lib/CodeGen/CGVtable.cpp | |
| parent | 11d2b2d2bb706fca0656f2760839721bb7f6cb6f (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
| -rw-r--r-- | lib/CodeGen/CGVtable.cpp | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 2d1c73440bbef..fc6d1a8e37092 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -3146,11 +3146,16 @@ void CodeGenVTables::EmitVTableRelatedData(GlobalDecl GD) {      if (KeyFunction->getCanonicalDecl() != MD->getCanonicalDecl())        return;    } else { +    // If we have no key funcion and this is a explicit instantiation declaration, +    // we will produce a vtable at the explicit instantiation. We don't need one +    // here. +    if (RDKind == clang::TSK_ExplicitInstantiationDeclaration) +      return; +      // If this is an explicit instantiation of a method, we don't need a vtable.      // Since we have no key function, we will emit the vtable when we see      // a use, and just defining a function is not an use. -    if ((RDKind == TSK_ImplicitInstantiation || -         RDKind == TSK_ExplicitInstantiationDeclaration) && +    if (RDKind == TSK_ImplicitInstantiation &&          MDKind == TSK_ExplicitInstantiationDefinition)        return;    } | 
