Skip to content

[6.0🍒] NCGenerics: it's not experimental #73514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions include/swift/Basic/Features.def
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ LANGUAGE_FEATURE(MoveOnlyPartialConsumption, 429, "Partial consumption of noncop
LANGUAGE_FEATURE(BitwiseCopyable, 426, "BitwiseCopyable protocol")
SUPPRESSIBLE_LANGUAGE_FEATURE(ConformanceSuppression, 426, "Suppressible inferred conformances")
SUPPRESSIBLE_LANGUAGE_FEATURE(BitwiseCopyable2, 426, "BitwiseCopyable feature")
SUPPRESSIBLE_LANGUAGE_FEATURE(NoncopyableGenerics, 427, "Noncopyable generics")

// Swift 6
UPCOMING_FEATURE(ConciseMagicFile, 274, 6)
Expand Down Expand Up @@ -321,9 +322,6 @@ EXPERIMENTAL_FEATURE(RawLayout, true)
/// Enables the "embedded" swift mode (no runtime).
EXPERIMENTAL_FEATURE(Embedded, true)

/// Enables noncopyable generics
SUPPRESSIBLE_EXPERIMENTAL_FEATURE(NoncopyableGenerics, true)

// Alias for NoncopyableGenerics
EXPERIMENTAL_FEATURE(NoncopyableGenerics2, true)

Expand Down
10 changes: 5 additions & 5 deletions lib/ClangImporter/ClangImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5778,16 +5778,16 @@ cloneBaseMemberDecl(ValueDecl *decl, DeclContext *newContext) {
if (auto var = dyn_cast<VarDecl>(decl)) {
auto oldContext = var->getDeclContext();
auto oldTypeDecl = oldContext->getSelfNominalTypeDecl();
// If the base type is non-copyable, and non-copyable generics are disabled,
// we cannot synthesize the accessor, because its implementation would use
// `UnsafePointer<BaseTy>`.
// If the base type is non-copyable, we cannot synthesize the accessor,
// because its implementation would use `UnsafePointer<BaseTy>`, and that
// triggers a bug when building SwiftCompilerSources. (rdar://128013193)
//
// We cannot use `ty->isNoncopyable()` here because that would create a
// cyclic dependency between ModuleQualifiedLookupRequest and
// LookupConformanceInModuleRequest, so we check for the presence of
// move-only attribute that is implicitly added to non-copyable C++ types by
// ClangImporter.
if (oldTypeDecl->getAttrs().hasAttribute<MoveOnlyAttr>() &&
!context.LangOpts.hasFeature(Feature::NoncopyableGenerics))
if (oldTypeDecl->getAttrs().hasAttribute<MoveOnlyAttr>())
return nullptr;

auto rawMemory = allocateMemoryForDecl<VarDecl>(var->getASTContext(),
Expand Down
10 changes: 5 additions & 5 deletions lib/ClangImporter/ImportType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,10 @@ namespace {
return importFunctionPointerLikeType(*type, pointeeType);
}

// If non-copyable generics are disabled, we cannot specify
// UnsafePointer<T> with a non-copyable type T.
// We cannot specify UnsafePointer<T> with a non-copyable type T just yet,
// because it triggers a bug when building SwiftCompilerSources.
// (rdar://128013193)
//
// We cannot use `ty->isNoncopyable()` here because that would create a
// cyclic dependency between ModuleQualifiedLookupRequest and
// LookupConformanceInModuleRequest, so we check for the presence of
Expand All @@ -519,9 +521,7 @@ namespace {
if (pointeeType && pointeeType->getAnyNominal() &&
pointeeType->getAnyNominal()
->getAttrs()
.hasAttribute<MoveOnlyAttr>() &&
!Impl.SwiftContext.LangOpts.hasFeature(
Feature::NoncopyableGenerics)) {
.hasAttribute<MoveOnlyAttr>()) {
auto opaquePointerDecl = Impl.SwiftContext.getOpaquePointerDecl();
if (!opaquePointerDecl)
return Type();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-sil-opt -transfer-non-sendable -enable-upcoming-feature RegionBasedIsolation -strict-concurrency=complete %s -verify -o /dev/null
// RUN: %target-sil-opt -enable-experimental-feature NoncopyableGenerics -transfer-non-sendable -enable-upcoming-feature RegionBasedIsolation -strict-concurrency=complete %s -verify -o /dev/null

// REQUIRES: concurrency
// REQUIRES: asserts
Expand Down Expand Up @@ -1797,4 +1796,4 @@ bb0:

%9999 = tuple ()
return %9999 : $()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -enable-experimental-feature NoncopyableGenerics -enable-experimental-feature NonescapableTypes %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -enable-experimental-feature NonescapableTypes %s -verify

// REQUIRES: objc_interop
// REQUIRES: asserts
Expand Down
1 change: 0 additions & 1 deletion test/Generics/inverse_associatedtype_restriction.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-typecheck-verify-swift \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature NonescapableTypes

// The restriction is that we don't permit suppression requirements on
Expand Down
3 changes: 1 addition & 2 deletions test/Generics/inverse_classes1.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-typecheck-verify-swift \
// RUN: -parse-stdlib -module-name Swift \
// RUN: -enable-experimental-feature MoveOnlyClasses \
// RUN: -enable-experimental-feature NoncopyableGenerics
// RUN: -enable-experimental-feature MoveOnlyClasses

// NOTE: -parse-stdlib is a transitional workaround and should not be required.

Expand Down
3 changes: 1 addition & 2 deletions test/Generics/inverse_classes2.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// RUN: %target-typecheck-verify-swift \
// RUN: -parse-stdlib -module-name Swift \
// RUN: -enable-experimental-feature NoncopyableGenerics
// RUN: -parse-stdlib -module-name Swift

// NOTE: -parse-stdlib is a transitional workaround and should not be required.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-typecheck-verify-swift \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature NonescapableTypes \
// RUN: -enable-experimental-feature SuppressedAssociatedTypes

Expand Down
1 change: 0 additions & 1 deletion test/Generics/inverse_copyable_requirement.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-typecheck-verify-swift
// RUN: %target-typecheck-verify-swift -enable-experimental-feature NoncopyableGenerics

// a concrete move-only type
struct MO: ~Copyable {
Expand Down
2 changes: 1 addition & 1 deletion test/Generics/inverse_copyable_requirement_errors.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature NoncopyableGenerics
// RUN: %target-typecheck-verify-swift

// a concrete move-only type
struct MO: ~Copyable {
Expand Down
1 change: 0 additions & 1 deletion test/Generics/inverse_extension_signatures.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-swift-frontend \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature NonescapableTypes \
// RUN: -verify -typecheck %s -debug-generic-signatures \
// RUN: -debug-inverse-requirements 2>&1 | %FileCheck %s --implicit-check-not "error:"
Expand Down
1 change: 0 additions & 1 deletion test/Generics/inverse_extensions.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-typecheck-verify-swift \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature NonescapableTypes \
// RUN: -enable-experimental-feature SuppressedAssociatedTypes

Expand Down
1 change: 0 additions & 1 deletion test/Generics/inverse_generics.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-typecheck-verify-swift \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature NonescapableTypes \
// RUN: -enable-experimental-feature SuppressedAssociatedTypes

Expand Down
2 changes: 1 addition & 1 deletion test/Generics/inverse_generics_stdlib.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift -parse-stdlib -module-name Swift -enable-experimental-feature BuiltinModule -enable-experimental-feature NoncopyableGenerics -enable-experimental-feature NonescapableTypes
// RUN: %target-typecheck-verify-swift -parse-stdlib -module-name Swift -enable-experimental-feature BuiltinModule -enable-experimental-feature NonescapableTypes



Expand Down
2 changes: 1 addition & 1 deletion test/Generics/inverse_protocols.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature NoncopyableGenerics
// RUN: %target-typecheck-verify-swift



Expand Down
2 changes: 1 addition & 1 deletion test/Generics/inverse_protocols_errors.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature NoncopyableGenerics
// RUN: %target-typecheck-verify-swift



Expand Down
2 changes: 1 addition & 1 deletion test/Generics/inverse_rdar119950540.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend %s -emit-silgen -enable-experimental-feature NoncopyableGenerics > /dev/null
// RUN: %target-swift-frontend %s -emit-silgen > /dev/null



Expand Down
2 changes: 1 addition & 1 deletion test/Generics/inverse_scoping.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature NoncopyableGenerics -enable-experimental-feature NonescapableTypes -enable-experimental-feature SuppressedAssociatedTypes
// RUN: %target-typecheck-verify-swift -enable-experimental-feature NonescapableTypes -enable-experimental-feature SuppressedAssociatedTypes



Expand Down
1 change: 0 additions & 1 deletion test/Generics/inverse_signatures.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-swift-frontend \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature NonescapableTypes \
// RUN: -enable-experimental-feature SuppressedAssociatedTypes \
// RUN: -verify -typecheck %s -debug-generic-signatures \
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/existential_shape_metadata_noncopyable.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend \
// RUN: -emit-ir %s -swift-version 5 \
// RUN: -disable-availability-checking \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature SuppressedAssociatedTypes \
// RUN: -module-name existential_shape_metadata | %IRGenFileCheck %s

Expand Down
1 change: 0 additions & 1 deletion test/IRGen/mangling_inverse_generics_evolution.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-ir -o - %s -module-name test \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature SuppressedAssociatedTypes \
// RUN: -enable-experimental-feature NonescapableTypes \
// RUN: -parse-as-library \
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/moveonly_enum_deinits.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-swift-emit-irgen \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -disable-type-layout \
// RUN: %s \
// RUN: | \
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/moveonly_value_functions.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-swift-emit-irgen -O \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -disable-type-layout \
// RUN: %s \
// RUN: | \
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/moveonly_value_functions_onone.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-swift-emit-irgen -Onone \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: %s \
// RUN: | \
// RUN: %IRGenFileCheck %s
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/noncopyable_field_descriptors.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-ir -o - %s -module-name test \
// RUN: -enable-experimental-feature NoncopyableGenerics \
// RUN: -enable-experimental-feature NonescapableTypes \
// RUN: -parse-as-library \
// RUN: -enable-library-evolution \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// RUN: %target-swift-emit-irgen -I %S/Inputs -cxx-interoperability-mode=swift-6 -enable-experimental-feature NoncopyableGenerics %s -validate-tbd-against-ir=none -Xcc -fignore-exceptions | %FileCheck %s
// RUN: %target-swift-emit-irgen -I %S/Inputs -cxx-interoperability-mode=upcoming-swift -enable-experimental-feature NoncopyableGenerics %s -validate-tbd-against-ir=none -Xcc -fignore-exceptions | %FileCheck %s
// RUN: %target-swift-emit-irgen -I %S/Inputs -cxx-interoperability-mode=swift-6 %s -validate-tbd-against-ir=none -Xcc -fignore-exceptions | %FileCheck %s
// RUN: %target-swift-emit-irgen -I %S/Inputs -cxx-interoperability-mode=upcoming-swift %s -validate-tbd-against-ir=none -Xcc -fignore-exceptions | %FileCheck %s

// REQUIRES: rdar128013193

import MoveOnlyCxxValueType

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// RUN: %target-swift-emit-sil -I %S/Inputs -cxx-interoperability-mode=swift-6 -enable-experimental-feature NoncopyableGenerics %s -validate-tbd-against-ir=none | %FileCheck %s
// RUN: %target-swift-emit-sil -I %S/Inputs -cxx-interoperability-mode=upcoming-swift -enable-experimental-feature NoncopyableGenerics %s -validate-tbd-against-ir=none | %FileCheck %s
// RUN: %target-swift-emit-sil -I %S/Inputs -cxx-interoperability-mode=swift-6 %s -validate-tbd-against-ir=none | %FileCheck %s
// RUN: %target-swift-emit-sil -I %S/Inputs -cxx-interoperability-mode=upcoming-swift %s -validate-tbd-against-ir=none | %FileCheck %s

// REQUIRES: rdar128013193

import MoveOnlyCxxValueType

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -enable-experimental-feature NoncopyableGenerics)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-none)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -O -Xfrontend -sil-verify-none)
//
// REQUIRES: executable_test
// REQUIRES: GH_ISSUE_70246
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=MoveOnlyCxxValueType -I %S/Inputs -cxx-interoperability-mode=upcoming-swift -source-filename=x | %FileCheck %s --check-prefix=CHECK-NO-NCG
// RUN: %target-swift-ide-test -print-module -module-to-print=MoveOnlyCxxValueType -I %S/Inputs -cxx-interoperability-mode=upcoming-swift -source-filename=x -enable-experimental-feature NoncopyableGenerics | %FileCheck %s --check-prefix=CHECK-NCG
// RUN: %target-swift-ide-test -print-module -module-to-print=MoveOnlyCxxValueType -I %S/Inputs -cxx-interoperability-mode=upcoming-swift -source-filename=x | %FileCheck %s --check-prefix=CHECK

// CHECK-NO-NCG: func getNonCopyablePtr() -> OpaquePointer
// CHECK-NO-NCG: func getNonCopyableDerivedPtr() -> OpaquePointer
// CHECK: func getNonCopyablePtr() -> OpaquePointer
// CHECK: func getNonCopyableDerivedPtr() -> OpaquePointer

// CHECK-NCG: func getNonCopyablePtr() -> UnsafeMutablePointer<NonCopyable>
// CHECK-NCG: func getNonCopyableDerivedPtr() -> UnsafeMutablePointer<NonCopyableDerived>
// FIXME: would prefer to have this (rdar://128013193)
// func getNonCopyablePtr() -> UnsafeMutablePointer<NonCopyable>
// func getNonCopyableDerivedPtr() -> UnsafeMutablePointer<NonCopyableDerived>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -enable-experimental-feature NoncopyableGenerics -D HAS_NONCOPYABLE_GENERICS)
// -- FIXME: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -D HAS_RDAR_128013193)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-5.9 -O)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-6 -O)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-6 -O -enable-experimental-feature NoncopyableGenerics -D HAS_NONCOPYABLE_GENERICS)

// REQUIRES: executable_test

Expand All @@ -29,7 +28,7 @@ MoveOnlyCxxValueType.test("Test derived move only type member access") {
var k = c.method(-3)
expectEqual(k, -6)
expectEqual(c.method(1), 2)
#if HAS_NONCOPYABLE_GENERICS
#if HAS_RDAR_128013193
k = c.x
expectEqual(k, 2)
c.x = 11
Expand Down Expand Up @@ -60,7 +59,7 @@ MoveOnlyCxxValueType.test("Test move only field access in holder") {
expectEqual(c.x.x, 5)
}

#if HAS_NONCOPYABLE_GENERICS
#if HAS_RDAR_128013193
MoveOnlyCxxValueType.test("Test move only field access in derived holder") {
var c = NonCopyableHolderDerivedDerived(-11)
var k = borrowNC(c.x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-5.9)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-6)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -enable-experimental-feature NoncopyableGenerics -D HAS_NONCOPYABLE_GENERICS)
// -- FIXME: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -D HAS_RDAR_128013193)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-5.9 -O)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-6 -O)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -O)
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -O -enable-experimental-feature NoncopyableGenerics -D HAS_NONCOPYABLE_GENERICS)
// -- FIXME: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -O -D HAS_RDAR_128013193)
//
// REQUIRES: executable_test

Expand Down Expand Up @@ -92,7 +92,7 @@ MoveOnlyCxxOperators.test("testNonCopyableHolderValueMutDeref pointee value") {
expectEqual(k.x, k2.x)
}

#if HAS_NONCOPYABLE_GENERICS
#if HAS_RDAR_128013193
MoveOnlyCxxOperators.test("NonCopyableHolderConstDerefDerivedDerived pointee borrow") {
let holder = NonCopyableHolderConstDerefDerivedDerived(11)
var k = borrowNC(holder.pointee)
Expand Down
1 change: 0 additions & 1 deletion test/Interpreter/currying_generics.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-run-simple-swift | %FileCheck %s
// RUN: %target-run-simple-swift -enable-experimental-feature NoncopyableGenerics | %FileCheck %s

// REQUIRES: executable_test

Expand Down
4 changes: 2 additions & 2 deletions test/Interpreter/escapable_generics_casting.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-experimental-feature NoncopyableGenerics -enable-experimental-feature NonescapableTypes) | %FileCheck %s
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-experimental-feature NoncopyableGenerics -enable-experimental-feature NonescapableTypes) | %FileCheck %s
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-experimental-feature NonescapableTypes) | %FileCheck %s
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-experimental-feature NonescapableTypes) | %FileCheck %s

// REQUIRES: executable_test, asserts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-run-simple-swift
// RUN: %target-run-simple-swift -enable-experimental-feature NoncopyableGenerics
// REQUIRES: executable_test

import StdlibUnittest
Expand Down
4 changes: 2 additions & 2 deletions test/Interpreter/generic_casts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// RUN: %target-run %t/a.out | %FileCheck --check-prefix CHECK %s
// RUN: %target-run %t/a.out.optimized | %FileCheck --check-prefix CHECK %s

// RUN: %target-build-swift -enable-experimental-feature NoncopyableGenerics -Onone %s -o %t/a.out
// RUN: %target-build-swift -enable-experimental-feature NoncopyableGenerics -O %s -o %t/a.out.optimized
// RUN: %target-build-swift -Onone %s -o %t/a.out
// RUN: %target-build-swift -O %s -o %t/a.out.optimized
// RUN: %target-codesign %t/a.out
// RUN: %target-codesign %t/a.out.optimized
//
Expand Down
4 changes: 2 additions & 2 deletions test/Interpreter/generic_casts_objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// RUN: %target-codesign %t/a.out.optimized
// RUN: %target-run %t/a.out.optimized | %FileCheck %s

// RUN: %target-build-swift -enable-experimental-feature NoncopyableGenerics -Onone %s -o %t/a.out
// RUN: %target-build-swift -Onone %s -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out | %FileCheck %s
// RUN: %target-build-swift -enable-experimental-feature NoncopyableGenerics -O %s -o %t/a.out.optimized
// RUN: %target-build-swift -O %s -o %t/a.out.optimized
// RUN: %target-codesign %t/a.out.optimized
// RUN: %target-run %t/a.out.optimized | %FileCheck %s

Expand Down
3 changes: 0 additions & 3 deletions test/Interpreter/moveonly_address_maximize.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all) | %FileCheck %s
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s

// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -Xfrontend -sil-verify-all) | %FileCheck %s
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all) | %FileCheck %s

// REQUIRES: executable_test

struct S : ~Copyable {
Expand Down
3 changes: 0 additions & 3 deletions test/Interpreter/moveonly_bufferview.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all) | %FileCheck %s
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s

// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -Xfrontend -sil-verify-all) | %FileCheck %s
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all) | %FileCheck %s

// REQUIRES: executable_test

public struct BufferView<T>: ~Copyable {
Expand Down
3 changes: 0 additions & 3 deletions test/Interpreter/moveonly_computed_property_in_class.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all)
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all)

// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -Xfrontend -sil-verify-all)
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all)

// REQUIRES: executable_test
@_moveOnly
struct FileDescriptor {
Expand Down
3 changes: 0 additions & 3 deletions test/Interpreter/moveonly_consuming_param.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// RUN: %target-run-simple-swift | %FileCheck %s
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s

// RUN: %target-run-simple-swift -enable-experimental-feature NoncopyableGenerics | %FileCheck %s
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all) | %FileCheck %s

// REQUIRES: executable_test

@_moveOnly
Expand Down
Loading