Skip to content

Commit f9797b4

Browse files
committed
[Runtime] Add dummy "module name" parameter to swift::_conformsToSwiftProtocol.
We know we're going to want this parameter to handle lookup of retroactive conformances when we've been given a module, so add it now because we want this to be an overridable entry point.
1 parent db7529f commit f9797b4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

stdlib/public/runtime/Private.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ class TypeInfo {
511511
/// returning the appropriate protocol conformance descriptor when it does.
512512
const ProtocolConformanceDescriptor *
513513
_conformsToSwiftProtocol(const Metadata * const type,
514-
const ProtocolDescriptor *protocol);
514+
const ProtocolDescriptor *protocol,
515+
StringRef module);
515516

516517
/// Retrieve an associated type witness from the given witness table.
517518
///

stdlib/public/runtime/ProtocolConformance.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,8 @@ namespace {
534534

535535
const ProtocolConformanceDescriptor *
536536
swift::_conformsToSwiftProtocol(const Metadata * const type,
537-
const ProtocolDescriptor *protocol) {
537+
const ProtocolDescriptor *protocol,
538+
StringRef module) {
538539
auto &C = Conformances.get();
539540

540541
// See if we have a cached conformance. The ConcurrentMap data structure
@@ -600,7 +601,7 @@ swift::_conformsToSwiftProtocol(const Metadata * const type,
600601
static const WitnessTable *
601602
swift_conformsToProtocolImpl(const Metadata * const type,
602603
const ProtocolDescriptor *protocol) {
603-
auto description = _conformsToSwiftProtocol(type, protocol);
604+
auto description = _conformsToSwiftProtocol(type, protocol, StringRef());
604605
if (!description)
605606
return nullptr;
606607

0 commit comments

Comments
 (0)