Skip to content

Commit ccac295

Browse files
authored
Merge pull request #79939 from bnbarham/proto-witness
[Runtime] Return ConformanceLookupResult from findConformanceWithDyld
2 parents 4ba8012 + a1a8bde commit ccac295

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

stdlib/public/runtime/ProtocolConformance.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,12 +1099,15 @@ findConformanceWithDyld(ConformanceState &C, const Metadata *type,
10991099
}
11001100
break;
11011101
}
1102-
case _dyld_protocol_conformance_result_kind_found_witness_table:
1102+
case _dyld_protocol_conformance_result_kind_found_witness_table: {
11031103
// If we found a witness table then we're done.
11041104
DYLD_CONFORMANCES_LOG("DYLD found witness table %p for conformance to %s",
11051105
dyldResult.value, protocol->Name.get());
1106-
return std::make_tuple(reinterpret_cast<const WitnessTable *>(dyldResult.value), nullptr,
1107-
false);
1106+
auto result = ConformanceLookupResult{
1107+
reinterpret_cast<const WitnessTable *>(dyldResult.value), nullptr,
1108+
nullptr};
1109+
return std::make_tuple(result, nullptr, false);
1110+
}
11081111
case _dyld_protocol_conformance_result_kind_not_found:
11091112
// If nothing is found, then we'll proceed with checking the runtime's
11101113
// caches and scanning conformance records.

0 commit comments

Comments
 (0)