mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Lift Requirement and Parameter Accessors up to GenericSignature
Start treating the null {Can}GenericSignature as a regular signature
with no requirements and no parameters. This not only makes for a much
safer abstraction, but allows us to simplify a lot of the clients of
GenericSignature that would previously have to check for null before
using the abstraction.
This commit is contained in:
@@ -292,7 +292,7 @@ void ExistentialTransform::convertExistentialArgTypesToGenericArgTypes(
|
||||
/// Determine the existing generic parameter depth.
|
||||
int Depth = 0;
|
||||
if (OrigGenericSig != nullptr) {
|
||||
Depth = OrigGenericSig->getGenericParams().back()->getDepth() + 1;
|
||||
Depth = OrigGenericSig.getGenericParams().back()->getDepth() + 1;
|
||||
}
|
||||
|
||||
/// Index of the Generic Parameter.
|
||||
@@ -526,7 +526,7 @@ void ExistentialTransform::populateThunkBody() {
|
||||
|
||||
unsigned int OrigDepth = 0;
|
||||
if (F->getLoweredFunctionType()->isPolymorphic()) {
|
||||
OrigDepth = OrigCalleeGenericSig->getGenericParams().back()->getDepth() + 1;
|
||||
OrigDepth = OrigCalleeGenericSig.getGenericParams().back()->getDepth() + 1;
|
||||
}
|
||||
SubstitutionMap OrigSubMap = F->getForwardingSubstitutionMap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user