mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Eliminate an unnecessary use of ASTContext::getOrCreateCanonicalGenericEnvironment().
GenericSignature::createGenericEnvironment() is a better API for this.
This commit is contained in:
@@ -54,12 +54,8 @@ static SILLocation getLocForValue(SILValue value) {
|
||||
|
||||
static GenericEnvironment *getGenericEnvironment(SILModule &Mod,
|
||||
CanSILFunctionType loweredTy) {
|
||||
auto *SM = Mod.getSwiftModule();
|
||||
auto &Ctx = loweredTy->getASTContext();
|
||||
auto *GSB = Ctx.getOrCreateGenericSignatureBuilder(
|
||||
loweredTy->getGenericSignature(), SM);
|
||||
auto *GenericEnv = Ctx.getOrCreateCanonicalGenericEnvironment(GSB, *SM);
|
||||
return GenericEnv;
|
||||
return loweredTy->getGenericSignature()->createGenericEnvironment(
|
||||
*Mod.getSwiftModule());
|
||||
}
|
||||
|
||||
/// Utility to determine if this is a large loadable type
|
||||
|
||||
Reference in New Issue
Block a user