We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbccd2d commit 35c67f6Copy full SHA for 35c67f6
lib/IRGen/LoadableByAddress.cpp
@@ -54,12 +54,8 @@ static SILLocation getLocForValue(SILValue value) {
54
55
static GenericEnvironment *getGenericEnvironment(SILModule &Mod,
56
CanSILFunctionType loweredTy) {
57
- auto *SM = Mod.getSwiftModule();
58
- auto &Ctx = loweredTy->getASTContext();
59
- auto *GSB = Ctx.getOrCreateGenericSignatureBuilder(
60
- loweredTy->getGenericSignature(), SM);
61
- auto *GenericEnv = Ctx.getOrCreateCanonicalGenericEnvironment(GSB, *SM);
62
- return GenericEnv;
+ return loweredTy->getGenericSignature()->createGenericEnvironment(
+ *Mod.getSwiftModule());
63
}
64
65
/// Utility to determine if this is a large loadable type
0 commit comments