summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-11-24 05:34:41 +0000
committerAnders Carlsson <andersca@mac.com>2009-11-24 05:34:41 +0000
commit65e6d131f00c6789126e9ee5bdb5c1433358f9db (patch)
treee2b4a0080121cb62b280c30c5f7504ea74c76da9 /clang/lib/Sema/SemaTemplate.cpp
parentfb8a93fe1db76f0afa5daa3b038020feda080836 (diff)
downloadbcm5719-llvm-65e6d131f00c6789126e9ee5bdb5c1433358f9db.tar.gz
bcm5719-llvm-65e6d131f00c6789126e9ee5bdb5c1433358f9db.zip
Set the template specialization kind before instantiating the function definition so that the function will have the right linkage.
llvm-svn: 89740
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index bfdf17afaee..a37a73119dd 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -4347,12 +4347,12 @@ Sema::DeclResult Sema::ActOnExplicitInstantiation(Scope *S,
if (SuppressNew)
return DeclPtrTy();
}
+
+ Specialization->setTemplateSpecializationKind(TSK, D.getIdentifierLoc());
if (TSK == TSK_ExplicitInstantiationDefinition)
InstantiateFunctionDefinition(D.getIdentifierLoc(), Specialization,
false, /*DefinitionRequired=*/true);
-
- Specialization->setTemplateSpecializationKind(TSK, D.getIdentifierLoc());
// C++0x [temp.explicit]p2:
// If the explicit instantiation is for a member function, a member class
OpenPOWER on IntegriCloud