Skip to content

Commit 32d3905

Browse files
committed
IRGen: Simplify PolymorphicConvention::enumerateUnfulfilledRequirements
1 parent f93620f commit 32d3905

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

lib/IRGen/GenProto.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,18 +305,8 @@ PolymorphicConvention::enumerateRequirements(const RequirementCallback &callback
305305
void PolymorphicConvention::
306306
enumerateUnfulfilledRequirements(const RequirementCallback &callback) {
307307
enumerateRequirements([&](GenericRequirement requirement) {
308-
if (requirement.isWitnessTable()) {
309-
if (!Fulfillments.getWitnessTable(requirement.getTypeParameter(),
310-
requirement.getProtocol())) {
311-
callback(requirement);
312-
}
313-
} else {
314-
assert(requirement.isMetadata());
315-
316-
if (!Fulfillments.getTypeMetadata(requirement.getTypeParameter())) {
317-
callback(requirement);
318-
}
319-
}
308+
if (!Fulfillments.getFulfillment(requirement))
309+
callback(requirement);
320310
});
321311
}
322312

0 commit comments

Comments
 (0)