Skip to content

Commit a06a421

Browse files
committed
AST: Remove origType parameter from substOpaqueTypesWithUnderlyingTypes()
1 parent ea05708 commit a06a421

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

include/swift/AST/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5026,7 +5026,7 @@ class SILFunctionConventions;
50265026
CanType substOpaqueTypesWithUnderlyingTypes(CanType type,
50275027
TypeExpansionContext context);
50285028
ProtocolConformanceRef
5029-
substOpaqueTypesWithUnderlyingTypes(ProtocolConformanceRef ref, Type origType,
5029+
substOpaqueTypesWithUnderlyingTypes(ProtocolConformanceRef ref,
50305030
TypeExpansionContext context);
50315031
namespace Lowering {
50325032
class TypeConverter;

include/swift/SIL/SILCloner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
576576
!context.shouldLookThroughOpaqueTypeArchetypes())
577577
return C;
578578

579-
return substOpaqueTypesWithUnderlyingTypes(C, Ty, context);
579+
return substOpaqueTypesWithUnderlyingTypes(C, context);
580580
}
581581

582582
return C;

lib/AST/TypeSubstitution.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ CanType swift::substOpaqueTypesWithUnderlyingTypes(CanType ty,
10891089
}
10901090

10911091
static ProtocolConformanceRef substOpaqueTypesWithUnderlyingTypesRec(
1092-
ProtocolConformanceRef ref, Type origType, const DeclContext *inContext,
1092+
ProtocolConformanceRef ref, const DeclContext *inContext,
10931093
ResilienceExpansion contextExpansion, bool isWholeModuleContext,
10941094
llvm::DenseSet<ReplaceOpaqueTypesWithUnderlyingTypes::SeenDecl> &decls) {
10951095
ReplaceOpaqueTypesWithUnderlyingTypes replacer(inContext, contextExpansion,
@@ -1100,7 +1100,7 @@ static ProtocolConformanceRef substOpaqueTypesWithUnderlyingTypesRec(
11001100
}
11011101

11021102
ProtocolConformanceRef swift::substOpaqueTypesWithUnderlyingTypes(
1103-
ProtocolConformanceRef ref, Type origType, TypeExpansionContext context) {
1103+
ProtocolConformanceRef ref, TypeExpansionContext context) {
11041104
ReplaceOpaqueTypesWithUnderlyingTypes replacer(
11051105
context.getContext(), context.getResilienceExpansion(),
11061106
context.isWholeModuleContext());
@@ -1174,7 +1174,7 @@ operator()(CanType maybeOpaqueType, Type replacementType,
11741174
}
11751175

11761176
auto res = ::substOpaqueTypesWithUnderlyingTypesRec(
1177-
substRef, substTy, inContext, contextExpansion, isContextWholeModule,
1177+
substRef, inContext, contextExpansion, isContextWholeModule,
11781178
*alreadySeen);
11791179
alreadySeen->erase(seenKey);
11801180
return res;
@@ -1184,7 +1184,7 @@ operator()(CanType maybeOpaqueType, Type replacementType,
11841184
llvm::DenseSet<SeenDecl> seenDecls;
11851185
seenDecls.insert(seenKey);
11861186
return ::substOpaqueTypesWithUnderlyingTypesRec(
1187-
substRef, substTy, inContext, contextExpansion, isContextWholeModule,
1187+
substRef, inContext, contextExpansion, isContextWholeModule,
11881188
seenDecls);
11891189
}
11901190
}

lib/IRGen/MetadataRequest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ IRGenModule::substOpaqueTypesWithUnderlyingTypes(CanType type,
560560
auto context = getMaximalTypeExpansionContext();
561561
return std::make_pair(
562562
swift::substOpaqueTypesWithUnderlyingTypes(type, context),
563-
swift::substOpaqueTypesWithUnderlyingTypes(conformance, type, context));
563+
swift::substOpaqueTypesWithUnderlyingTypes(conformance, context));
564564
}
565565

566566
return std::make_pair(type, conformance);

lib/SIL/IR/SILTypeSubstitution.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class SILTypeSubstituter :
7777
return substOpaqueTypesWithUnderlyingTypes(
7878
ProtocolConformanceRef::forAbstract(conformingReplacementType,
7979
conformedProtocol),
80-
conformingReplacementType->getCanonicalType(),
8180
typeExpansionContext);
8281
},
8382
SubstFlags::SubstituteOpaqueArchetypes |
@@ -292,7 +291,7 @@ class SILTypeSubstituter :
292291
});
293292
if (substType->hasOpaqueArchetype()) {
294293
substConformance = substOpaqueTypesWithUnderlyingTypes(
295-
substConformance, substType, typeExpansionContext);
294+
substConformance, typeExpansionContext);
296295
}
297296
}
298297

0 commit comments

Comments
 (0)