@@ -508,7 +508,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
508508
509509 SILType remapType (SILType Ty) {
510510 if (Functor.SubsMap || Ty.hasLocalArchetype ()) {
511- SubstOptions options (std:: nullopt ) ;
511+ SubstOptions options = SubstFlags::SubstitutePrimaryArchetypes ;
512512 if (Functor.hasLocalArchetypes ())
513513 options |= SubstFlags::SubstituteLocalArchetypes;
514514
@@ -533,7 +533,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
533533
534534 CanType remapASTType (CanType ty) {
535535 if (Functor.SubsMap || ty->hasLocalArchetype ()) {
536- SubstOptions options (std:: nullopt ) ;
536+ SubstOptions options = SubstFlags::SubstitutePrimaryArchetypes ;
537537 if (Functor.hasLocalArchetypes ())
538538 options |= SubstFlags::SubstituteLocalArchetypes;
539539
@@ -557,7 +557,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
557557
558558 ProtocolConformanceRef remapConformance (Type Ty, ProtocolConformanceRef C) {
559559 if (Functor.SubsMap || Ty->hasLocalArchetype ()) {
560- SubstOptions options (std:: nullopt ) ;
560+ SubstOptions options = SubstFlags::SubstitutePrimaryArchetypes ;
561561 if (Functor.hasLocalArchetypes ())
562562 options |= SubstFlags::SubstituteLocalArchetypes;
563563
@@ -582,7 +582,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
582582 SubstitutionMap remapSubstitutionMap (SubstitutionMap Subs) {
583583 // If we have local archetypes to substitute, do so now.
584584 if (Functor.SubsMap || Subs.getRecursiveProperties ().hasLocalArchetype ()) {
585- SubstOptions options (std:: nullopt ) ;
585+ SubstOptions options = SubstFlags::SubstitutePrimaryArchetypes ;
586586 if (Functor.hasLocalArchetypes ())
587587 options |= SubstFlags::SubstituteLocalArchetypes;
588588
0 commit comments