File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1371,7 +1371,6 @@ bool LinkEntity::isWeakImported(ModuleDecl *module) const {
1371
1371
case Kind::ObjCMetaclass:
1372
1372
case Kind::SwiftMetaclassStub:
1373
1373
case Kind::ClassMetadataBaseOffset:
1374
- case Kind::PropertyDescriptor:
1375
1374
case Kind::NominalTypeDescriptor:
1376
1375
case Kind::NominalTypeDescriptorRecord:
1377
1376
case Kind::ModuleDescriptor:
@@ -1390,6 +1389,11 @@ bool LinkEntity::isWeakImported(ModuleDecl *module) const {
1390
1389
case Kind::OpaqueTypeDescriptorAccessorVar:
1391
1390
case Kind::DistributedAccessor:
1392
1391
return getDecl ()->isWeakImported (module );
1392
+
1393
+ case Kind::PropertyDescriptor:
1394
+ // Static properties may have nil property descriptors if declared in
1395
+ // modules compiled with older compilers and should be weak linked.
1396
+ return (getDecl ()->isWeakImported (module ) || getDecl ()->isStatic ());
1393
1397
1394
1398
case Kind::CanonicalSpecializedGenericSwiftMetaclassStub:
1395
1399
return getType ()->getClassOrBoundGenericClass ()->isWeakImported (module );
You can’t perform that action at this time.
0 commit comments