@@ -528,8 +528,7 @@ CanType IRGenModule::substOpaqueTypesWithUnderlyingTypes(CanType type) {
528528 // Substitute away opaque types whose underlying types we're allowed to
529529 // assume are constant.
530530 if (type->hasOpaqueArchetype ()) {
531- auto context = TypeExpansionContext::maximal (getSwiftModule (),
532- getSILModule ().isWholeModule ());
531+ auto context = getMaximalTypeExpansionContext ();
533532 return swift::substOpaqueTypesWithUnderlyingTypes (type, context,
534533 /* allowLoweredTypes=*/ false );
535534 }
@@ -542,8 +541,7 @@ SILType IRGenModule::substOpaqueTypesWithUnderlyingTypes(
542541 // Substitute away opaque types whose underlying types we're allowed to
543542 // assume are constant.
544543 if (type.getASTType ()->hasOpaqueArchetype ()) {
545- auto context = TypeExpansionContext::maximal (getSwiftModule (),
546- getSILModule ().isWholeModule ());
544+ auto context = getMaximalTypeExpansionContext ();
547545 return SILType::getPrimitiveType (
548546 swift::substOpaqueTypesWithUnderlyingTypes (type.getASTType (), context,
549547 /* allowLoweredTypes=*/ true ),
@@ -559,8 +557,7 @@ IRGenModule::substOpaqueTypesWithUnderlyingTypes(CanType type,
559557 // Substitute away opaque types whose underlying types we're allowed to
560558 // assume are constant.
561559 if (type->hasOpaqueArchetype ()) {
562- auto context = TypeExpansionContext::maximal (getSwiftModule (),
563- getSILModule ().isWholeModule ());
560+ auto context = getMaximalTypeExpansionContext ();
564561 return std::make_pair (
565562 swift::substOpaqueTypesWithUnderlyingTypes (type, context,
566563 /* allowLoweredTypes=*/ false ),
0 commit comments