mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Conformance cache] Handle missing protocol descriptors
This can happen when running against an older version of a library that doesn't have the protocol defined.
This commit is contained in:
@@ -586,7 +586,10 @@ namespace {
|
||||
if (auto proto = ProtoOrStorage.dyn_cast<const ProtocolDescriptor *>())
|
||||
return proto;
|
||||
|
||||
return ProtoOrStorage.get<const ExtendedStorage *>()->Proto;
|
||||
if (auto storage = ProtoOrStorage.dyn_cast<const ExtendedStorage *>())
|
||||
return storage->Proto;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/// Get the conformance cache key.
|
||||
|
||||
Reference in New Issue
Block a user