mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rename "suppressible protocols" to "invertible protocols".
We've decided to use the "invertible protocols" terminology throughout the runtime and compiler, so move over to that terminology consistently.
This commit is contained in:
@@ -1417,21 +1417,21 @@ getFunctionTypeFlags(CanFunctionType type) {
|
||||
}
|
||||
|
||||
// Compute the set of suppressed protocols.
|
||||
SuppressibleProtocolSet suppressedProtocols;
|
||||
for (auto suppressibleKind : SuppressibleProtocolSet::allKnown()) {
|
||||
switch (suppressibleKind) {
|
||||
case SuppressibleProtocolKind::Copyable: {
|
||||
InvertibleProtocolSet InvertedProtocols;
|
||||
for (auto invertibleKind : InvertibleProtocolSet::allKnown()) {
|
||||
switch (invertibleKind) {
|
||||
case InvertibleProtocolKind::Copyable: {
|
||||
// If the function type is noncopyable, note that in the suppressed
|
||||
// protocols.
|
||||
auto proto =
|
||||
type->getASTContext().getProtocol(KnownProtocolKind::Copyable);
|
||||
if (proto &&
|
||||
proto->getParentModule()->lookupConformance(type, proto).isInvalid())
|
||||
suppressedProtocols.insert(suppressibleKind);
|
||||
InvertedProtocols.insert(invertibleKind);
|
||||
break;
|
||||
}
|
||||
|
||||
case SuppressibleProtocolKind::Escapable:
|
||||
case InvertibleProtocolKind::Escapable:
|
||||
// We intentionally do not record the "escapable" bit here, because it's
|
||||
// already in the normal function type flags. The runtime will
|
||||
// introduce it as necessary.
|
||||
@@ -1444,7 +1444,7 @@ getFunctionTypeFlags(CanFunctionType type) {
|
||||
auto extFlags = ExtendedFunctionTypeFlags()
|
||||
.withTypedThrows(!type->getThrownError().isNull())
|
||||
.withTransferringResult(type->hasTransferringResult())
|
||||
.withSuppressedProtocols(suppressedProtocols);
|
||||
.withInvertedProtocols(InvertedProtocols);
|
||||
|
||||
if (isolation.isErased())
|
||||
extFlags = extFlags.withIsolatedAny();
|
||||
|
||||
Reference in New Issue
Block a user