Skip to content

Commit e3b68e7

Browse files
committed
Remove -enable-experimental-subclass-existentials staging flag
1 parent 1bce1be commit e3b68e7

21 files changed

+21
-38
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ namespace swift {
165165
/// optimized custom allocator, so that memory debugging tools can be used.
166166
bool UseMalloc = false;
167167

168-
/// \brief Enable classes to appear in protocol composition types.
169-
bool EnableExperimentalSubclassExistentials = false;
170-
171168
/// \brief Enable experimental property behavior feature.
172169
bool EnableExperimentalPropertyBehaviors = false;
173170

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,6 @@ def enable_experimental_deserialization_recovery :
274274
Flag<["-"], "enable-experimental-deserialization-recovery">,
275275
HelpText<"Attempt to recover from missing xrefs (etc) in swiftmodules">;
276276

277-
def enable_experimental_subclass_existentials : Flag<["-"],
278-
"enable-experimental-subclass-existentials">,
279-
HelpText<"Enable classes to appear in protocol composition types">;
280-
281277
def enable_cow_existentials : Flag<["-"], "enable-cow-existentials">,
282278
HelpText<"Enable the copy-on-write existential implementation">;
283279

lib/ClangImporter/ImportType.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,8 @@ namespace {
883883
} else {
884884
SmallVector<Type, 4> memberTypes;
885885

886-
if (Impl.SwiftContext.LangOpts.EnableExperimentalSubclassExistentials) {
887-
if (auto superclassType = typeParam->getSuperclass())
888-
memberTypes.push_back(superclassType);
889-
}
886+
if (auto superclassType = typeParam->getSuperclass())
887+
memberTypes.push_back(superclassType);
890888

891889
for (auto protocolDecl : typeParam->getConformingProtocols())
892890
memberTypes.push_back(protocolDecl->getDeclaredType());
@@ -1029,9 +1027,7 @@ namespace {
10291027
// Swift 3 compatibility -- don't import subclass existentials
10301028
if (!type->qual_empty() &&
10311029
(importedType->isAnyObject() ||
1032-
(!Impl.SwiftContext.isSwiftVersion3() &&
1033-
Impl.SwiftContext.LangOpts.EnableExperimentalSubclassExistentials))) {
1034-
1030+
!Impl.SwiftContext.isSwiftVersion3())) {
10351031
SmallVector<Type, 4> members;
10361032
if (!importedType->isAnyObject())
10371033
members.push_back(importedType);

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,9 +910,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
910910
Opts.EnableExperimentalKeyPaths |=
911911
Args.hasArg(OPT_enable_experimental_keypaths);
912912

913-
Opts.EnableExperimentalSubclassExistentials |=
914-
Args.hasArg(OPT_enable_experimental_subclass_existentials);
915-
916913
Opts.EnableClassResilience |=
917914
Args.hasArg(OPT_enable_class_resilience);
918915

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,8 +3100,7 @@ Type TypeResolver::resolveCompositionType(CompositionTypeRepr *repr,
31003100
if (!ty || ty->hasError()) return ty;
31013101

31023102
auto nominalDecl = ty->getAnyNominal();
3103-
if (TC.Context.LangOpts.EnableExperimentalSubclassExistentials &&
3104-
nominalDecl && isa<ClassDecl>(nominalDecl)) {
3103+
if (nominalDecl && isa<ClassDecl>(nominalDecl)) {
31053104
if (checkSuperclass(tyR->getStartLoc(), ty))
31063105
continue;
31073106

test/ClangImporter/objc_bridging_generics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify -enable-experimental-subclass-existentials -swift-version 4 %s
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify -swift-version 4 %s
22

33
// REQUIRES: objc_interop
44

test/ClangImporter/objc_bridging_generics_swift3.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify -enable-experimental-subclass-existentials -swift-version 3 %s
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify -swift-version 3 %s
22

33
// REQUIRES: objc_interop
44

test/ClangImporter/subclass_existentials.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -o - -primary-file %s -swift-version 4 -enable-experimental-subclass-existentials
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -o - -primary-file %s -swift-version 4
22

33
// REQUIRES: objc_interop
44

test/ClangImporter/subclass_existentials_ir.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -o - -primary-file %s -swift-version 4 -enable-experimental-subclass-existentials
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -o - -primary-file %s -swift-version 4
22

33
// REQUIRES: objc_interop
44

test/ClangImporter/subclass_existentials_swift3.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -o - -primary-file %s -enable-experimental-subclass-existentials -swift-version 3
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -o - -primary-file %s -swift-version 3
22

33
// REQUIRES: objc_interop
44

0 commit comments

Comments
 (0)