File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,8 @@ class SILFunction
236
236
// / The lowered type of the function.
237
237
CanSILFunctionType LoweredType;
238
238
239
+ CanSILFunctionType LoweredTypeInContext;
240
+
239
241
// / The context archetypes of the function.
240
242
GenericEnvironment *GenericEnv = nullptr ;
241
243
Original file line number Diff line number Diff line change @@ -5292,7 +5292,12 @@ TypeExpansionContext::TypeExpansionContext(const SILFunction &f)
5292
5292
isContextWholeModule(f.getModule().isWholeModule()) {}
5293
5293
5294
5294
CanSILFunctionType SILFunction::getLoweredFunctionTypeInContext () const {
5295
- return getLoweredFunctionTypeInContext (getTypeExpansionContext ());
5295
+ if (!LoweredTypeInContext) {
5296
+ const_cast <SILFunction *>(this )->LoweredTypeInContext
5297
+ = getLoweredFunctionTypeInContext (
5298
+ getTypeExpansionContext ());
5299
+ }
5300
+ return LoweredTypeInContext;
5296
5301
}
5297
5302
5298
5303
CanSILFunctionType SILFunction::getLoweredFunctionTypeInContext (
You can’t perform that action at this time.
0 commit comments