mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Simplify the interface to Module::lookupConformance.
Rather than returning a weird PointerIntPair, return an Optional<ProtocolConformanceRef>. NFC
This commit is contained in:
@@ -167,9 +167,9 @@ collectExistentialConformances(Module *M, Type fromType, Type toType) {
|
||||
|
||||
SmallVector<ProtocolConformanceRef, 4> conformances;
|
||||
for (auto proto : protocols) {
|
||||
ProtocolConformance *conformance =
|
||||
auto conformance =
|
||||
M->lookupConformance(fromType, proto, nullptr).getPointer();
|
||||
conformances.push_back(ProtocolConformanceRef(proto, conformance));
|
||||
conformances.push_back(*conformance);
|
||||
}
|
||||
|
||||
return M->getASTContext().AllocateCopy(conformances);
|
||||
|
||||
Reference in New Issue
Block a user