File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -711,6 +711,12 @@ bool IRGenerator::canEmitWitnessTableLazily(SILWitnessTable *wt) {
711
711
if (Opts.UseJIT )
712
712
return false ;
713
713
714
+ // Regardless of the access level, if the witness table is shared it means
715
+ // we can safely not emit it. Every other module which needs it will generate
716
+ // its own shared copy of it.
717
+ if (wt->getLinkage () == SILLinkage::Shared)
718
+ return true ;
719
+
714
720
NominalTypeDecl *ConformingTy =
715
721
wt->getConformance ()->getType ()->getNominalOrBoundGenericNominal ();
716
722
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import gizmo
12
12
// CHECK: @"$sSo16NSRuncingOptionsVN" = linkonce_odr hidden constant
13
13
// CHECK-SAME: @"$sBi{{[0-9]+}}_WV"
14
14
// CHECK: @"$sSo16NSRuncingOptionsVSQSCMc" = linkonce_odr hidden constant %swift.protocol_conformance_descriptor { {{.*}}@"$sSo16NSRuncingOptionsVSQSCWa
15
- // CHECK: @"$sSo28NeverActuallyMentionedByNameVSQSCWp" = linkonce_odr hidden constant
15
+ // CHECK-NOT : @"$sSo28NeverActuallyMentionedByNameVSQSCWp" = linkonce_odr hidden constant
16
16
17
17
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} i32 @main
18
18
// CHECK: call swiftcc %swift.metadata_response @"$sSo16NSRuncingOptionsVMa"(i64 0)
You can’t perform that action at this time.
0 commit comments