mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Factor out a new Requirement::getProtocolDecl() utility method
This commit is contained in:
@@ -5243,8 +5243,7 @@ GenericRequirementsMetadata irgen::addGenericRequirements(
|
||||
break;
|
||||
|
||||
case RequirementKind::Conformance: {
|
||||
auto protocol = requirement.getSecondType()->castTo<ProtocolType>()
|
||||
->getDecl();
|
||||
auto protocol = requirement.getProtocolDecl();
|
||||
|
||||
// Marker protocols do not record generic requirements at all.
|
||||
if (protocol->isMarkerProtocol()) {
|
||||
|
||||
Reference in New Issue
Block a user