Skip to content

Commit 6789506

Browse files
committed
[IRGen] Distributed: Skip protocols that don't require witness tables for decodeNextArgument call
1 parent 738ac14 commit 6789506

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/IRGen/GenDistributed.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,9 @@ void DistributedAccessor::lookupWitnessTables(
530530
auto conformsToProtocol = IGM.getConformsToProtocolFunctionPointer();
531531

532532
for (auto *protocol : protocols) {
533+
if (!Lowering::TypeConverter::protocolRequiresWitnessTable(protocol))
534+
continue;
535+
533536
auto *protocolDescriptor = IGM.getAddrOfProtocolDescriptor(protocol);
534537
auto *witnessTable =
535538
IGF.Builder.CreateCall(conformsToProtocol, {value, protocolDescriptor});

0 commit comments

Comments
 (0)