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 @@ -1355,7 +1355,6 @@ bool LinkEntity::isWeakImported(ModuleDecl *module) const {
1355
1355
case Kind::ObjCMetaclass:
1356
1356
case Kind::SwiftMetaclassStub:
1357
1357
case Kind::ClassMetadataBaseOffset:
1358
- case Kind::PropertyDescriptor:
1359
1358
case Kind::NominalTypeDescriptor:
1360
1359
case Kind::NominalTypeDescriptorRecord:
1361
1360
case Kind::ModuleDescriptor:
@@ -1374,6 +1373,11 @@ bool LinkEntity::isWeakImported(ModuleDecl *module) const {
1374
1373
case Kind::OpaqueTypeDescriptorAccessorVar:
1375
1374
case Kind::DistributedAccessor:
1376
1375
return getDecl ()->isWeakImported (module );
1376
+
1377
+ case Kind::PropertyDescriptor:
1378
+ // Static properties may have nil property descriptors if declared in
1379
+ // modules compiled with older compilers and should be weak linked.
1380
+ return (getDecl ()->isWeakImported (module ) || getDecl ()->isStatic ());
1377
1381
1378
1382
case Kind::CanonicalSpecializedGenericSwiftMetaclassStub:
1379
1383
return getType ()->getClassOrBoundGenericClass ()->isWeakImported (module );
You can’t perform that action at this time.
0 commit comments