diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-04 22:48:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-04 22:48:11 +0000 |
commit | d0e3daf2b980b505e535d35b432c938c6d0208ef (patch) | |
tree | e503ee747ebf8da57ddddaee8b43fa885c75b7b8 /lib/CodeGen | |
parent | 4fe95f99a2693f1145785ea5835ba6937e49c730 (diff) |
Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index cde6e89d66..180a68659d 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -250,9 +250,8 @@ GetLinkageForFunction(ASTContext &Context, const FunctionDecl *FD, // The kind of external linkage this function will have, if it is not // inline or static. CodeGenModule::GVALinkage External = CodeGenModule::GVA_StrongExternal; - if (Context.getLangOptions().CPlusPlus && - (FD->getPrimaryTemplate() || FD->getInstantiatedFromMemberFunction()) && - !FD->isExplicitSpecialization()) + if (Context.getLangOptions().CPlusPlus && + FD->getTemplateSpecializationKind() == TSK_ImplicitInstantiation) External = CodeGenModule::GVA_TemplateInstantiation; if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) { |