[cfe-commits] r89740 - /cfe/trunk/lib/Sema/SemaTemplate.cpp
Anders Carlsson
andersca at mac.com
Mon Nov 23 21:34:41 PST 2009
Author: andersca
Date: Mon Nov 23 23:34:41 2009
New Revision: 89740
URL: http://llvm.org/viewvc/llvm-project?rev=89740&view=rev
Log:
Set the template specialization kind before instantiating the function definition so that the function will have the right linkage.
Modified:
cfe/trunk/lib/Sema/SemaTemplate.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=89740&r1=89739&r2=89740&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Mon Nov 23 23:34:41 2009
@@ -4347,12 +4347,12 @@
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
More information about the cfe-commits
mailing list