mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Add AbstractionPattern::getNumFunctionParams()
This commit is contained in:
@@ -751,6 +751,10 @@ AbstractionPattern::getFunctionParamType(unsigned index) const {
|
||||
}
|
||||
}
|
||||
|
||||
unsigned AbstractionPattern::getNumFunctionParams() const {
|
||||
return cast<AnyFunctionType>(getType()).getParams().size();
|
||||
}
|
||||
|
||||
static CanType getOptionalObjectType(CanType type) {
|
||||
auto objectType = type.getOptionalObjectType();
|
||||
assert(objectType && "type was not optional");
|
||||
|
||||
Reference in New Issue
Block a user