@@ -528,8 +528,7 @@ CanType IRGenModule::substOpaqueTypesWithUnderlyingTypes(CanType type) {
528
528
// Substitute away opaque types whose underlying types we're allowed to
529
529
// assume are constant.
530
530
if (type->hasOpaqueArchetype ()) {
531
- auto context = TypeExpansionContext::maximal (getSwiftModule (),
532
- getSILModule ().isWholeModule ());
531
+ auto context = getMaximalTypeExpansionContext ();
533
532
return swift::substOpaqueTypesWithUnderlyingTypes (type, context,
534
533
/* allowLoweredTypes=*/ false );
535
534
}
@@ -542,8 +541,7 @@ SILType IRGenModule::substOpaqueTypesWithUnderlyingTypes(
542
541
// Substitute away opaque types whose underlying types we're allowed to
543
542
// assume are constant.
544
543
if (type.getASTType ()->hasOpaqueArchetype ()) {
545
- auto context = TypeExpansionContext::maximal (getSwiftModule (),
546
- getSILModule ().isWholeModule ());
544
+ auto context = getMaximalTypeExpansionContext ();
547
545
return SILType::getPrimitiveType (
548
546
swift::substOpaqueTypesWithUnderlyingTypes (type.getASTType (), context,
549
547
/* allowLoweredTypes=*/ true ),
@@ -559,8 +557,7 @@ IRGenModule::substOpaqueTypesWithUnderlyingTypes(CanType type,
559
557
// Substitute away opaque types whose underlying types we're allowed to
560
558
// assume are constant.
561
559
if (type->hasOpaqueArchetype ()) {
562
- auto context = TypeExpansionContext::maximal (getSwiftModule (),
563
- getSILModule ().isWholeModule ());
560
+ auto context = getMaximalTypeExpansionContext ();
564
561
return std::make_pair (
565
562
swift::substOpaqueTypesWithUnderlyingTypes (type, context,
566
563
/* allowLoweredTypes=*/ false ),
0 commit comments