mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Runtime] Make swift::swift_conformsToSwiftProtocol overridable.
This is a funnel point for looking up the protocol conformance descriptor for a given conforming type + conformance. Make it overridable in case we need to back-deploy changes or fixes. Implements rdar://problem/46281660.
This commit is contained in:
@@ -532,10 +532,10 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
const ProtocolConformanceDescriptor *
|
||||
swift::_conformsToSwiftProtocol(const Metadata * const type,
|
||||
const ProtocolDescriptor *protocol,
|
||||
StringRef module) {
|
||||
static const ProtocolConformanceDescriptor *
|
||||
swift_conformsToSwiftProtocolImpl(const Metadata * const type,
|
||||
const ProtocolDescriptor *protocol,
|
||||
StringRef module) {
|
||||
auto &C = Conformances.get();
|
||||
|
||||
// See if we have a cached conformance. The ConcurrentMap data structure
|
||||
@@ -601,7 +601,8 @@ swift::_conformsToSwiftProtocol(const Metadata * const type,
|
||||
static const WitnessTable *
|
||||
swift_conformsToProtocolImpl(const Metadata * const type,
|
||||
const ProtocolDescriptor *protocol) {
|
||||
auto description = _conformsToSwiftProtocol(type, protocol, StringRef());
|
||||
auto description =
|
||||
swift_conformsToSwiftProtocol(type, protocol, StringRef());
|
||||
if (!description)
|
||||
return nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user