Skip to content

[Runtime] Return ConformanceLookupResult from findConformanceWithDyld #79939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions stdlib/public/runtime/ProtocolConformance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1099,12 +1099,15 @@ findConformanceWithDyld(ConformanceState &C, const Metadata *type,
}
break;
}
case _dyld_protocol_conformance_result_kind_found_witness_table:
case _dyld_protocol_conformance_result_kind_found_witness_table: {
// If we found a witness table then we're done.
DYLD_CONFORMANCES_LOG("DYLD found witness table %p for conformance to %s",
dyldResult.value, protocol->Name.get());
return std::make_tuple(reinterpret_cast<const WitnessTable *>(dyldResult.value), nullptr,
false);
auto result = ConformanceLookupResult{
reinterpret_cast<const WitnessTable *>(dyldResult.value), nullptr,
nullptr};
return std::make_tuple(result, nullptr, false);
}
case _dyld_protocol_conformance_result_kind_not_found:
// If nothing is found, then we'll proceed with checking the runtime's
// caches and scanning conformance records.
Expand Down