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:
@@ -271,13 +271,8 @@ SILGenModule::getConformanceToObjectiveCBridgeable(SILLocation loc, Type type) {
|
||||
|
||||
// Find the conformance to _ObjectiveCBridgeable.
|
||||
auto result = SwiftModule->lookupConformance(type, proto, nullptr);
|
||||
switch (result.getInt()) {
|
||||
case ConformanceKind::Conforms:
|
||||
return result.getPointer();
|
||||
|
||||
case ConformanceKind::DoesNotConform:
|
||||
return nullptr;
|
||||
}
|
||||
if (result) return result->getConcrete();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SILFunction *SILGenModule::emitTopLevelFunction(SILLocation Loc) {
|
||||
|
||||
Reference in New Issue
Block a user