File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2941,9 +2941,9 @@ namespace {
2941
2941
void addValueWitnessTable () {
2942
2942
ClassDecl *cls = Target;
2943
2943
2944
- auto type = (cls->checkObjCAncestry () != ObjCClassKind::NonObjC)
2945
- ? CanType ( this ->IGM .Context .TheUnknownObjectType )
2946
- : CanType ( this ->IGM .Context .TheNativeObjectType );
2944
+ auto type = (cls->checkObjCAncestry () != ObjCClassKind::NonObjC
2945
+ ? this ->IGM .Context .TheUnknownObjectType
2946
+ : this ->IGM .Context .TheNativeObjectType );
2947
2947
auto wtable = this ->IGM .getAddrOfValueWitnessTable (type);
2948
2948
addWord (wtable);
2949
2949
}
@@ -4743,7 +4743,11 @@ namespace {
4743
4743
// Visitor methods.
4744
4744
4745
4745
void addValueWitnessTable () {
4746
- auto type = IGM.Context .TheUnknownObjectType ;
4746
+ // Without Objective-C interop, foreign classes must still use
4747
+ // Swift native reference counting.
4748
+ auto type = (IGM.ObjCInterop
4749
+ ? IGM.Context .TheUnknownObjectType
4750
+ : IGM.Context .TheNativeObjectType );
4747
4751
auto wtable = IGM.getAddrOfValueWitnessTable (type);
4748
4752
addWord (wtable);
4749
4753
}
You can’t perform that action at this time.
0 commit comments