@@ -9021,8 +9021,7 @@ Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc,
90219021 // The declaration itself has not actually been instantiated, so it is
90229022 // still okay to specialize it.
90239023 StripImplicitInstantiation (
9024- PrevDecl,
9025- Context.getTargetInfo ().getTriple ().isWindowsGNUEnvironment ());
9024+ PrevDecl, Context.getTargetInfo ().getTriple ().isOSCygMing ());
90269025 return false ;
90279026 }
90289027 // Fall through
@@ -9892,7 +9891,7 @@ DeclResult Sema::ActOnExplicitInstantiation(
98929891 : TSK_ExplicitInstantiationDeclaration;
98939892
98949893 if (TSK == TSK_ExplicitInstantiationDeclaration &&
9895- !Context.getTargetInfo ().getTriple ().isWindowsGNUEnvironment ()) {
9894+ !Context.getTargetInfo ().getTriple ().isOSCygMing ()) {
98969895 // Check for dllexport class template instantiation declarations,
98979896 // except for MinGW mode.
98989897 for (const ParsedAttr &AL : Attr) {
@@ -9957,7 +9956,7 @@ DeclResult Sema::ActOnExplicitInstantiation(
99579956 = PrevDecl ? PrevDecl->getTemplateSpecializationKind () : TSK_Undeclared;
99589957
99599958 if (TSK == TSK_ExplicitInstantiationDefinition && PrevDecl != nullptr &&
9960- Context.getTargetInfo ().getTriple ().isWindowsGNUEnvironment ()) {
9959+ Context.getTargetInfo ().getTriple ().isOSCygMing ()) {
99619960 // Check for dllexport class template instantiation definitions in MinGW
99629961 // mode, if a previous declaration of the instantiation was seen.
99639962 for (const ParsedAttr &AL : Attr) {
@@ -10125,7 +10124,7 @@ DeclResult Sema::ActOnExplicitInstantiation(
1012510124 // In MinGW mode, export the template instantiation if the declaration
1012610125 // was marked dllexport.
1012710126 if (PrevDecl_TSK == TSK_ExplicitInstantiationDeclaration &&
10128- Context.getTargetInfo ().getTriple ().isWindowsGNUEnvironment () &&
10127+ Context.getTargetInfo ().getTriple ().isOSCygMing () &&
1012910128 PrevDecl->hasAttr <DLLExportAttr>()) {
1013010129 dllExportImportClassTemplateSpecialization (*this , Def);
1013110130 }
0 commit comments