File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1073,6 +1073,12 @@ class TypeConverter {
1073
1073
GenericSignatureWithCapturedEnvironments
1074
1074
getGenericSignatureWithCapturedEnvironments (SILDeclRef constant);
1075
1075
1076
+ // / Get the substitution map for calling a constant.
1077
+ SubstitutionMap
1078
+ getSubstitutionMapWithCapturedEnvironments (SILDeclRef constant,
1079
+ const CaptureInfo &captureInfo,
1080
+ SubstitutionMap subs);
1081
+
1076
1082
// / Get the generic environment for a constant.
1077
1083
GenericEnvironment *getConstantGenericEnvironment (SILDeclRef constant);
1078
1084
Original file line number Diff line number Diff line change @@ -4110,6 +4110,21 @@ TypeConverter::getGenericSignatureWithCapturedEnvironments(SILDeclRef c) {
4110
4110
llvm_unreachable (" Unhandled SILDeclRefKind in switch." );
4111
4111
}
4112
4112
4113
+ SubstitutionMap
4114
+ TypeConverter::getSubstitutionMapWithCapturedEnvironments (
4115
+ SILDeclRef constant, const CaptureInfo &captureInfo,
4116
+ SubstitutionMap subs) {
4117
+ auto sig = getGenericSignatureWithCapturedEnvironments (constant);
4118
+ if (!sig.genericSig ) {
4119
+ assert (!sig.baseGenericSig );
4120
+ assert (sig.capturedEnvs .empty ());
4121
+ return SubstitutionMap ();
4122
+ }
4123
+
4124
+ return buildSubstitutionMapWithCapturedEnvironments (
4125
+ subs, sig.genericSig , sig.capturedEnvs );
4126
+ }
4127
+
4113
4128
GenericEnvironment *
4114
4129
TypeConverter::getConstantGenericEnvironment (SILDeclRef c) {
4115
4130
return getGenericSignatureWithCapturedEnvironments (c)
You can’t perform that action at this time.
0 commit comments