Skip to content

Commit d326c8e

Browse files
committed
Revert "IRGen: If Objective-C interop is disabled foreign classes should use Swift reference counting"
This reverts commit 54a6b46. This is breaking testing on iOS.
1 parent 54a6b46 commit d326c8e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/IRGen/GenMeta.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,9 +2941,9 @@ namespace {
29412941
void addValueWitnessTable() {
29422942
ClassDecl *cls = Target;
29432943

2944-
auto type = (cls->checkObjCAncestry() != ObjCClassKind::NonObjC
2945-
? this->IGM.Context.TheUnknownObjectType
2946-
: this->IGM.Context.TheNativeObjectType);
2944+
auto type = (cls->checkObjCAncestry() != ObjCClassKind::NonObjC)
2945+
? CanType(this->IGM.Context.TheUnknownObjectType)
2946+
: CanType(this->IGM.Context.TheNativeObjectType);
29472947
auto wtable = this->IGM.getAddrOfValueWitnessTable(type);
29482948
addWord(wtable);
29492949
}
@@ -4743,11 +4743,7 @@ namespace {
47434743
// Visitor methods.
47444744

47454745
void addValueWitnessTable() {
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);
4746+
auto type = IGM.Context.TheUnknownObjectType;
47514747
auto wtable = IGM.getAddrOfValueWitnessTable(type);
47524748
addWord(wtable);
47534749
}

0 commit comments

Comments
 (0)