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 @@ -4088,6 +4088,21 @@ TypeConverter::getGenericSignatureWithCapturedEnvironments(SILDeclRef c) {
4088
4088
llvm_unreachable (" Unhandled SILDeclRefKind in switch." );
4089
4089
}
4090
4090
4091
+ SubstitutionMap
4092
+ TypeConverter::getSubstitutionMapWithCapturedEnvironments (
4093
+ SILDeclRef constant, const CaptureInfo &captureInfo,
4094
+ SubstitutionMap subs) {
4095
+ auto sig = getGenericSignatureWithCapturedEnvironments (constant);
4096
+ if (!sig.genericSig ) {
4097
+ assert (!sig.baseGenericSig );
4098
+ assert (sig.capturedEnvs .empty ());
4099
+ return SubstitutionMap ();
4100
+ }
4101
+
4102
+ return buildSubstitutionMapWithCapturedEnvironments (
4103
+ subs, sig.genericSig , sig.capturedEnvs );
4104
+ }
4105
+
4091
4106
GenericEnvironment *
4092
4107
TypeConverter::getConstantGenericEnvironment (SILDeclRef c) {
4093
4108
return getGenericSignatureWithCapturedEnvironments (c)
You can’t perform that action at this time.
0 commit comments