diff --git a/test/ASTGen/attrs.swift b/test/ASTGen/attrs.swift index b91811d9b15..07cca346f22 100644 --- a/test/ASTGen/attrs.swift +++ b/test/ASTGen/attrs.swift @@ -12,9 +12,8 @@ // REQUIRES: executable_test // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_ParserASTGen -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/ASTGen/decls.swift b/test/ASTGen/decls.swift index bb5e57757a4..f6697ccc8d4 100644 --- a/test/ASTGen/decls.swift +++ b/test/ASTGen/decls.swift @@ -13,9 +13,10 @@ // REQUIRES: executable_test // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_ParserASTGen +// REQUIRES: swift_feature_SwiftParser +// REQUIRES: swift_feature_ValueGenerics -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/ASTGen/diagnostics.swift b/test/ASTGen/diagnostics.swift index 3102ba792e4..99cd5a1ee92 100644 --- a/test/ASTGen/diagnostics.swift +++ b/test/ASTGen/diagnostics.swift @@ -12,8 +12,7 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-bare-slash-regex -enable-experimental-feature ParserASTGen // REQUIRES: swift_swift_parser -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts +// REQUIRES: swift_feature_ParserASTGen // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/ASTGen/do_expr.swift b/test/ASTGen/do_expr.swift index e9f87559a09..56b8b86a1de 100644 --- a/test/ASTGen/do_expr.swift +++ b/test/ASTGen/do_expr.swift @@ -12,8 +12,8 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature DoExpressions -enable-experimental-feature ParserASTGen // REQUIRES: swift_swift_parser -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts +// REQUIRES: swift_feature_DoExpressions +// REQUIRES: swift_feature_ParserASTGen // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/ASTGen/exprs.swift b/test/ASTGen/exprs.swift index 2d81cfa49e1..4257bec379d 100644 --- a/test/ASTGen/exprs.swift +++ b/test/ASTGen/exprs.swift @@ -13,9 +13,9 @@ // REQUIRES: executable_test // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_ParserASTGen +// REQUIRES: swift_feature_SwiftParser -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/ASTGen/if_config.swift b/test/ASTGen/if_config.swift index 23232d1bd5c..1b53cd4ce3c 100644 --- a/test/ASTGen/if_config.swift +++ b/test/ASTGen/if_config.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -DDISCARDABLE -DNONSENDABLE -swift-version 6 -/// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts + +// REQUIRES: swift_feature_ParserASTGen #if NOT_SET func f { } // expected-error{{expected parameter clause in function signature}} diff --git a/test/ASTGen/if_config_expr.swift b/test/ASTGen/if_config_expr.swift index 2b4df56d8d5..58b49e0b742 100644 --- a/test/ASTGen/if_config_expr.swift +++ b/test/ASTGen/if_config_expr.swift @@ -1,8 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -D CONDITION_1 -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_ParserASTGen postfix operator ++ postfix func ++ (_: Int) -> Int { 0 } diff --git a/test/ASTGen/macros.swift b/test/ASTGen/macros.swift index 44828b43a08..79ac9c4fa4e 100644 --- a/test/ASTGen/macros.swift +++ b/test/ASTGen/macros.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser, asserts +// REQUIRES: swift_feature_ParserASTGen // RUN: %empty-directory(%t) diff --git a/test/ASTGen/regex.swift b/test/ASTGen/regex.swift index c3d0214d9df..118824e6501 100644 --- a/test/ASTGen/regex.swift +++ b/test/ASTGen/regex.swift @@ -11,9 +11,8 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -enable-bare-slash-regex -disable-availability-checking // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_ParserASTGen -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/ASTGen/stmts.swift b/test/ASTGen/stmts.swift index f0f71b20b05..f5d60b405bd 100644 --- a/test/ASTGen/stmts.swift +++ b/test/ASTGen/stmts.swift @@ -12,9 +12,10 @@ // REQUIRES: executable_test // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_ParserASTGen +// REQUIRES: swift_feature_SwiftParser +// REQUIRES: swift_feature_ThenStatements -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/ASTGen/top_level.swift b/test/ASTGen/top_level.swift index 500eacc5c45..aea76a28d94 100644 --- a/test/ASTGen/top_level.swift +++ b/test/ASTGen/top_level.swift @@ -8,8 +8,8 @@ // RUN: %diff -u %t/astgen.ast %t/cpp-parser.ast -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts +// REQUIRES: swift_feature_ParserASTGen + // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/ASTGen/types.swift b/test/ASTGen/types.swift index 4624cb03fc6..664cc1b5ebe 100644 --- a/test/ASTGen/types.swift +++ b/test/ASTGen/types.swift @@ -1,7 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts +// REQUIRES: swift_feature_ParserASTGen + // rdar://116686158 // UNSUPPORTED: asan diff --git a/test/AssociatedTypeInference/associated_type_tuple.swift b/test/AssociatedTypeInference/associated_type_tuple.swift index b74c72ff2c2..9652eba556f 100644 --- a/test/AssociatedTypeInference/associated_type_tuple.swift +++ b/test/AssociatedTypeInference/associated_type_tuple.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature TupleConformances -// REQUIRES: asserts +// REQUIRES: swift_feature_TupleConformances typealias Tuple = (repeat each T) diff --git a/test/CAS/block-list.swift b/test/CAS/block-list.swift index 969657ded8f..b0d2dca3185 100644 --- a/test/CAS/block-list.swift +++ b/test/CAS/block-list.swift @@ -40,6 +40,9 @@ // RUN: -cache-replay-prefix-map /^tmp=%t \ // RUN: /^tmp/main.swift @%t/MyApp.cmd 2>&1 | %FileCheck %s --check-prefix CHECK-BLOCKED +// REQUIRES: swift_feature_LayoutStringValueWitnesses +// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation + // CHECK-BLOCKED: note: Layout string value witnesses have been disabled for module 'Test' through block list entry // CHECK-BLOCKED-NOT: type_layout_string diff --git a/test/ClangImporter/dynamic_actor_isolation_checks.swift b/test/ClangImporter/dynamic_actor_isolation_checks.swift index d063e443343..9dec7cdd7dc 100644 --- a/test/ClangImporter/dynamic_actor_isolation_checks.swift +++ b/test/ClangImporter/dynamic_actor_isolation_checks.swift @@ -4,9 +4,9 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-availability-checking -enable-upcoming-feature DynamicActorIsolation -emit-silgen -module-name preconcurrency_conformances %t/src/checks.swift | %FileCheck %t/src/checks.swift // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-availability-checking -swift-version 6 -disable-dynamic-actor-isolation -emit-silgen -module-name preconcurrency_conformances %t/src/checks_disabled.swift | %FileCheck %t/src/checks_disabled.swift -// REQUIRES: asserts // REQUIRES: concurrency // REQUIRES: objc_interop +// REQUIRES: swift_feature_DynamicActorIsolation //--- checks.swift import Foundation diff --git a/test/ClangImporter/incomplete_objc_types_availability.swift b/test/ClangImporter/incomplete_objc_types_availability.swift index e916a308eb9..bf11b0e5673 100644 --- a/test/ClangImporter/incomplete_objc_types_availability.swift +++ b/test/ClangImporter/incomplete_objc_types_availability.swift @@ -10,6 +10,7 @@ // REQUIRES: objc_interop // REQUIRES: executable_test +// REQUIRES: swift_feature_ImportObjcForwardDeclarations // Verify that Clang declarations referencing either of the forward declares types "ForwardDeclaredInterface" or // "ForwardDeclaredProtocol" are usable from Swift. diff --git a/test/ClangImporter/incomplete_objc_types_base_interface.swift b/test/ClangImporter/incomplete_objc_types_base_interface.swift index 95c22b96ed9..ec7ff98c63d 100644 --- a/test/ClangImporter/incomplete_objc_types_base_interface.swift +++ b/test/ClangImporter/incomplete_objc_types_base_interface.swift @@ -8,6 +8,7 @@ // REQUIRES: objc_interop // REQUIRES: executable_test // REQUIRES: OS=macosx +// REQUIRES: swift_feature_ImportObjcForwardDeclarations import Foundation import IncompleteTypeLibrary1 diff --git a/test/ClangImporter/incomplete_objc_types_bridging_header.swift b/test/ClangImporter/incomplete_objc_types_bridging_header.swift index 2181be5d94b..9447fe5c23b 100644 --- a/test/ClangImporter/incomplete_objc_types_bridging_header.swift +++ b/test/ClangImporter/incomplete_objc_types_bridging_header.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -import-objc-header %S/Inputs/incomplete_objc_types_bridging_header.h -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations let foo = CFunctionReturningAForwardDeclaredInterface() CFunctionTakingAForwardDeclaredInterface(foo) diff --git a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift index c4b80cb8ca9..183242d465b 100644 --- a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift +++ b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift @@ -11,6 +11,7 @@ // REQUIRES: objc_interop // REQUIRES: executable_test +// REQUIRES: swift_feature_ImportObjcForwardDeclarations // "ForwardDeclaredInterface" and "ForwardDeclaredProtocol" are forward declared in IncompleteTypeLibrary1/2, and // completely declared in CompleteTypes. This test verifies that instances of the complete types can be passed diff --git a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift index bbd8c7fdb44..37806c0f205 100644 --- a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift +++ b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift @@ -9,6 +9,7 @@ // REQUIRES: executable_test // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations //--- full_definition.swift diff --git a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift index d3c6e6380e5..b08c32afea8 100644 --- a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift +++ b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift @@ -5,6 +5,7 @@ // RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %t/incomplete_definition.swift %t/full_definition.swift -diagnostic-style llvm 2>&1 | %FileCheck %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations //--- full_definition.swift diff --git a/test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift b/test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift index 119238c06e8..0c0ba6f5e2d 100644 --- a/test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift +++ b/test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift @@ -11,6 +11,7 @@ // REQUIRES: objc_interop // REQUIRES: executable_test +// REQUIRES: swift_feature_ImportObjcForwardDeclarations // Both libraries "IncompleteTypeConsumer1" and "IncompleteTypeConsumer2" forward declare an interface "ForwardDeclaredInterface" // and a protocol "ForwardDeclaredProtocol". This test verifies that the synthesized Swift declaration created to represent diff --git a/test/ClangImporter/incomplete_objc_types_full_availability.swift b/test/ClangImporter/incomplete_objc_types_full_availability.swift index 93bc42d217b..65df5197fd1 100644 --- a/test/ClangImporter/incomplete_objc_types_full_availability.swift +++ b/test/ClangImporter/incomplete_objc_types_full_availability.swift @@ -7,6 +7,7 @@ // REQUIRES: objc_interop // REQUIRES: executable_test +// REQUIRES: swift_feature_ImportObjCForwardDeclarations import IncompleteTypeLibrary1 import CompleteTypes diff --git a/test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift b/test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift index 32b95a32aaf..b32d6361d72 100644 --- a/test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift +++ b/test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift @@ -2,6 +2,7 @@ // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s -diagnostic-style llvm 2>&1 | %FileCheck %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations import IncompleteTypeLibrary1 import IncompleteNoRootTypeProtocolLibrary diff --git a/test/ClangImporter/incomplete_objc_types_no_reference.swift b/test/ClangImporter/incomplete_objc_types_no_reference.swift index a87a4be5cbd..f43a9a8bf45 100644 --- a/test/ClangImporter/incomplete_objc_types_no_reference.swift +++ b/test/ClangImporter/incomplete_objc_types_no_reference.swift @@ -2,6 +2,7 @@ // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations import IncompleteTypeLibrary1 diff --git a/test/ClangImporter/incomplete_objc_types_no_root_protocol.swift b/test/ClangImporter/incomplete_objc_types_no_root_protocol.swift index 14b864a11b9..7580bcf87b2 100644 --- a/test/ClangImporter/incomplete_objc_types_no_root_protocol.swift +++ b/test/ClangImporter/incomplete_objc_types_no_root_protocol.swift @@ -9,6 +9,7 @@ // REQUIRES: objc_interop // REQUIRES: executable_test +// REQUIRES: swift_feature_ImportObjcForwardDeclarations // Verify that a forward declared protocol not inheriting from NSObject is usable // from Swift, if cumbersome diff --git a/test/ClangImporter/incomplete_objc_types_nsproxy.swift b/test/ClangImporter/incomplete_objc_types_nsproxy.swift index bf2cf197545..826f63226b9 100644 --- a/test/ClangImporter/incomplete_objc_types_nsproxy.swift +++ b/test/ClangImporter/incomplete_objc_types_nsproxy.swift @@ -9,6 +9,7 @@ // REQUIRES: objc_interop // REQUIRES: executable_test +// REQUIRES: swift_feature_ImportObjcForwardDeclarations // Verify that a forward declared interface for a type inheriting from NSProxy instead // of NSObject is still usable from Swift. diff --git a/test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift b/test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift index b6ff0d67078..8a4a9845dd3 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift @@ -4,6 +4,7 @@ // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations import CompleteSwiftTypes import ObjCLibraryForwardDeclaringCompleteSwiftTypes diff --git a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift index 4dbb435ecfc..ce3c5384575 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift @@ -4,6 +4,7 @@ // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations @_implementationOnly import CompleteSwiftTypes import ObjCLibraryForwardDeclaringCompleteSwiftTypes diff --git a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift index 6a9e7d28c88..eaf7c440aca 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift @@ -4,6 +4,7 @@ // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations import CompleteSwiftTypes import ObjCLibraryForwardDeclaringCompleteSwiftTypes diff --git a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift index 40a2597055c..07d841b3996 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift @@ -6,6 +6,7 @@ // REQUIRES: objc_interop // REQUIRES: executable_test +// REQUIRES: swift_feature_ImportObjcForwardDeclarations import CompleteSwiftTypes import ObjCLibraryForwardDeclaringCompleteSwiftTypes diff --git a/test/ClangImporter/incomplete_objc_types_swift_ide_test.swift b/test/ClangImporter/incomplete_objc_types_swift_ide_test.swift index f067a4bfcc1..a16a91dc09f 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_ide_test.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_ide_test.swift @@ -11,6 +11,7 @@ // RUN: -enable-objc-interop -swift-version 6 -source-filename x | %FileCheck %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations // CHECK: import Foundation // CHECK: @available(*, unavailable, message: "This Objective-C class has only been forward-declared; import its owning module to use it") diff --git a/test/ClangImporter/objc_async.swift b/test/ClangImporter/objc_async.swift index 442f7994c72..35368883d29 100644 --- a/test/ClangImporter/objc_async.swift +++ b/test/ClangImporter/objc_async.swift @@ -2,7 +2,7 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers import Foundation import ObjCConcurrency diff --git a/test/ClangImporter/objc_forward_declarations.swift b/test/ClangImporter/objc_forward_declarations.swift index 3144b1bfad7..766164f990b 100644 --- a/test/ClangImporter/objc_forward_declarations.swift +++ b/test/ClangImporter/objc_forward_declarations.swift @@ -2,6 +2,8 @@ // RUN: %target-swift-frontend -emit-module -o %t -I %S/Inputs/custom-modules -enable-objc-interop %s // RUN: %target-swift-ide-test -print-module -module-to-print objc_forward_declarations -I %t -I %S/Inputs/custom-modules -enable-objc-interop -enable-upcoming-feature ImportObjcForwardDeclarations -source-filename x | %FileCheck %s +// REQUIRES: swift_feature_ImportObjcForwardDeclarations + // CHECK: class Innocuous : Confusing { import ForwardDeclarationsHelper diff --git a/test/ClangImporter/sending.swift b/test/ClangImporter/sending.swift index 8d4cadc0f0a..a8bc236d9e6 100644 --- a/test/ClangImporter/sending.swift +++ b/test/ClangImporter/sending.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -swift-version 6 -disable-availability-checking -emit-sil -o /dev/null %s -parse-as-library -enable-experimental-feature SendingArgsAndResults -verify -import-objc-header %S/Inputs/sending.h // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_SendingArgsAndResults //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/CaseIterableIsolation.swift b/test/Concurrency/CaseIterableIsolation.swift index 7d0e2e377b0..42c52125e16 100644 --- a/test/Concurrency/CaseIterableIsolation.swift +++ b/test/Concurrency/CaseIterableIsolation.swift @@ -3,6 +3,7 @@ // REQUIRES: executable_test // REQUIRES: concurrency +// REQUIRES: swift_feature_RegionBasedIsolation import StdlibUnittest diff --git a/test/Concurrency/Runtime/actor_deinit_escaping_self.swift b/test/Concurrency/Runtime/actor_deinit_escaping_self.swift index 486e484a984..fbb42b1c392 100644 --- a/test/Concurrency/Runtime/actor_deinit_escaping_self.swift +++ b/test/Concurrency/Runtime/actor_deinit_escaping_self.swift @@ -4,6 +4,7 @@ // REQUIRES: libdispatch // REQUIRES: concurrency // REQUIRES: concurrency_runtime +// REQUIRES: swift_feature_IsolatedDeinit // UNSUPPORTED: back_deployment_runtime import _Concurrency diff --git a/test/Concurrency/Runtime/actor_recursive_deinit.swift b/test/Concurrency/Runtime/actor_recursive_deinit.swift index a759155f2bf..bcd82826b88 100644 --- a/test/Concurrency/Runtime/actor_recursive_deinit.swift +++ b/test/Concurrency/Runtime/actor_recursive_deinit.swift @@ -4,6 +4,7 @@ // REQUIRES: concurrency // REQUIRES: concurrency_runtime +// REQUIRES: swift_feature_IsolatedDeinit // UNSUPPORTED: back_deployment_runtime // Compiler crashes because builtin "ifdef_SWIFT_STDLIB_PRINT_DISABLED"() gets lowered as "i32 0", diff --git a/test/Concurrency/Runtime/async_task_locals_isolated_deinit.swift b/test/Concurrency/Runtime/async_task_locals_isolated_deinit.swift index 8b8d25c8413..258196a492d 100644 --- a/test/Concurrency/Runtime/async_task_locals_isolated_deinit.swift +++ b/test/Concurrency/Runtime/async_task_locals_isolated_deinit.swift @@ -7,6 +7,7 @@ // REQUIRES: executable_test // REQUIRES: concurrency // REQUIRES: concurrency_runtime +// REQUIRES: swift_feature_IsolatedDeinit // UNSUPPORTED: back_deployment_runtime import Swift @@ -87,14 +88,14 @@ class Probe { var probeExpectedExecutor: UnownedSerialExecutor let probeExpectedNumber: Int let probeGroup: DispatchGroup - + init(expectedNumber: Int, group: DispatchGroup) { self.probeExpectedExecutor = AnotherActor.shared.unownedExecutor self.probeExpectedNumber = expectedNumber self.probeGroup = group group.enter() } - + deinit { expectTrue(isCurrentExecutor(probeExpectedExecutor)) expectEqual(probeExpectedNumber, TL.number) @@ -148,7 +149,7 @@ if #available(SwiftStdlib 5.1, *) { } group.wait() } - + tests.test("class sync slow path") { let group = DispatchGroup() group.enter(1) diff --git a/test/Concurrency/Runtime/isolated_deinit_main_sync.swift b/test/Concurrency/Runtime/isolated_deinit_main_sync.swift index cb4a04b7134..aacbc447e65 100644 --- a/test/Concurrency/Runtime/isolated_deinit_main_sync.swift +++ b/test/Concurrency/Runtime/isolated_deinit_main_sync.swift @@ -3,6 +3,7 @@ // REQUIRES: executable_test // REQUIRES: concurrency // REQUIRES: concurrency_runtime +// REQUIRES: swift_feature_IsolatedDeinit var isDead: Bool = false diff --git a/test/Concurrency/actor_call_implicitly_async.swift b/test/Concurrency/actor_call_implicitly_async.swift index 591c97ec80d..553064f61a1 100644 --- a/test/Concurrency/actor_call_implicitly_async.swift +++ b/test/Concurrency/actor_call_implicitly_async.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature InferSendableFromCaptures -parse-as-library %s -emit-sil -o /dev/null -verify // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_InferSendableFromCaptures // some utilities func thrower() throws {} diff --git a/test/Concurrency/actor_defer.swift b/test/Concurrency/actor_defer.swift index f8a784cb384..fcda74b6184 100644 --- a/test/Concurrency/actor_defer.swift +++ b/test/Concurrency/actor_defer.swift @@ -6,7 +6,7 @@ // RUN: %target-swift-frontend -parse-as-library -emit-sil -enable-actor-data-race-checks -o - %s | %FileCheck %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation func doSomething() {} diff --git a/test/Concurrency/actor_derived_conformances.swift b/test/Concurrency/actor_derived_conformances.swift index 6fb9f06897a..f95069d033f 100644 --- a/test/Concurrency/actor_derived_conformances.swift +++ b/test/Concurrency/actor_derived_conformances.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation actor A1: Comparable {} // expected-error@-1 {{type 'A1' does not conform to protocol 'Comparable'}} diff --git a/test/Concurrency/actor_existentials.swift b/test/Concurrency/actor_existentials.swift index a24d0899ee1..94b1a68862f 100644 --- a/test/Concurrency/actor_existentials.swift +++ b/test/Concurrency/actor_existentials.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation protocol P: Actor { func f() diff --git a/test/Concurrency/actor_isolation.swift b/test/Concurrency/actor_isolation.swift index 2d59f6d3338..a0b39d309ab 100644 --- a/test/Concurrency/actor_isolation.swift +++ b/test/Concurrency/actor_isolation.swift @@ -6,7 +6,7 @@ // RUN: %target-swift-frontend -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-upcoming-feature GlobalActorIsolatedTypesUsability %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability import GlobalVariables import OtherActors // expected-warning{{add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'OtherActors'}}{{1-1=@preconcurrency }} diff --git a/test/Concurrency/actor_isolation_cycle.swift b/test/Concurrency/actor_isolation_cycle.swift index 9b2d84d69ad..5fdfefadf4a 100644 --- a/test/Concurrency/actor_isolation_cycle.swift +++ b/test/Concurrency/actor_isolation_cycle.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation public protocol P { associatedtype T diff --git a/test/Concurrency/actor_isolation_objc.swift b/test/Concurrency/actor_isolation_objc.swift index 287df3630fb..b98a1b5975f 100644 --- a/test/Concurrency/actor_isolation_objc.swift +++ b/test/Concurrency/actor_isolation_objc.swift @@ -5,7 +5,7 @@ // REQUIRES: concurrency // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation import Foundation diff --git a/test/Concurrency/actor_isolation_unsafe.swift b/test/Concurrency/actor_isolation_unsafe.swift index 5996521947b..178e6a7cbf9 100644 --- a/test/Concurrency/actor_isolation_unsafe.swift +++ b/test/Concurrency/actor_isolation_unsafe.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete-tns- -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @globalActor actor SomeGlobalActor { diff --git a/test/Concurrency/actor_keypath_isolation.swift b/test/Concurrency/actor_keypath_isolation.swift index 59a5408932b..0327cd629da 100644 --- a/test/Concurrency/actor_keypath_isolation.swift +++ b/test/Concurrency/actor_keypath_isolation.swift @@ -2,7 +2,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -strict-concurrency=complete %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation class Box { let size : Int = 0 diff --git a/test/Concurrency/actor_withCancellationHandler.swift b/test/Concurrency/actor_withCancellationHandler.swift index 65c7ad046f0..182e1c895e5 100644 --- a/test/Concurrency/actor_withCancellationHandler.swift +++ b/test/Concurrency/actor_withCancellationHandler.swift @@ -5,7 +5,7 @@ // RUN: %target-swift-frontend -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation actor Foo { var t: Task? diff --git a/test/Concurrency/assume_mainactor.swift b/test/Concurrency/assume_mainactor.swift index 042d989967e..e9e9206adfc 100644 --- a/test/Concurrency/assume_mainactor.swift +++ b/test/Concurrency/assume_mainactor.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -swift-version 6 -emit-silgen -enable-experimental-feature UnspecifiedMeansMainActorIsolated %s | %FileCheck %s // RUN: %target-swift-frontend -swift-version 6 -emit-sil -enable-experimental-feature UnspecifiedMeansMainActorIsolated %s -verify -// REQUIRES: asserts +// REQUIRES: swift_feature_UnspecifiedMeansMainActorIsolated // READ THIS! This test is meant to FileCheck the specific isolation when // UnspecifiedMeansMainActorIsolated is enabled. Please do not put other types diff --git a/test/Concurrency/assume_mainactor_typechecker_errors.swift b/test/Concurrency/assume_mainactor_typechecker_errors.swift index 17b22e0ceb5..cd9f22199dc 100644 --- a/test/Concurrency/assume_mainactor_typechecker_errors.swift +++ b/test/Concurrency/assume_mainactor_typechecker_errors.swift @@ -1,6 +1,6 @@ // RUN: %target-swift-frontend -swift-version 6 -emit-sil -enable-experimental-feature UnspecifiedMeansMainActorIsolated %s -verify -// REQUIRES: asserts +// REQUIRES: swift_feature_UnspecifiedMeansMainActorIsolated // READ THIS! This test is meant to check the specific isolation when // UnspecifiedMeansMainActorIsolated is enabled in combination with validating diff --git a/test/Concurrency/async_computed_property.swift b/test/Concurrency/async_computed_property.swift index 607a4b464f0..219b85ff429 100644 --- a/test/Concurrency/async_computed_property.swift +++ b/test/Concurrency/async_computed_property.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation func asyncFunc(_ value: String) async {} diff --git a/test/Concurrency/async_conformance.swift b/test/Concurrency/async_conformance.swift index 6af79866a9e..8a96ba40c92 100644 --- a/test/Concurrency/async_conformance.swift +++ b/test/Concurrency/async_conformance.swift @@ -5,7 +5,7 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation import Foundation diff --git a/test/Concurrency/async_initializer.swift b/test/Concurrency/async_initializer.swift index 5845139e267..13e65397f8b 100644 --- a/test/Concurrency/async_initializer.swift +++ b/test/Concurrency/async_initializer.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -enable-experimental-concurrency -target %target-swift-5.1-abi-triple -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation %s -verify-additional-prefix complete-and-tns- // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation //// // some functions to play with diff --git a/test/Concurrency/async_initializer_objc.swift b/test/Concurrency/async_initializer_objc.swift index 716c4a06b92..20dbe49da04 100644 --- a/test/Concurrency/async_initializer_objc.swift +++ b/test/Concurrency/async_initializer_objc.swift @@ -5,7 +5,7 @@ // REQUIRES: concurrency // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation import Foundation diff --git a/test/Concurrency/async_let_capture.swift b/test/Concurrency/async_let_capture.swift index e2fd812c4a2..f82f3d94f91 100644 --- a/test/Concurrency/async_let_capture.swift +++ b/test/Concurrency/async_let_capture.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation func autoclosureCapture(_: @autoclosure () async throws -> Int) async {} func nonescapingCapture(_: () async throws -> Int) {} diff --git a/test/Concurrency/async_main_invalid_global_actor.swift b/test/Concurrency/async_main_invalid_global_actor.swift index 220794f5dea..9d5273b5c3a 100644 --- a/test/Concurrency/async_main_invalid_global_actor.swift +++ b/test/Concurrency/async_main_invalid_global_actor.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @globalActor actor Kat { diff --git a/test/Concurrency/async_main_mainactor_isolation.swift b/test/Concurrency/async_main_mainactor_isolation.swift index c2f0fe8e8e2..fa0afc591b6 100644 --- a/test/Concurrency/async_main_mainactor_isolation.swift +++ b/test/Concurrency/async_main_mainactor_isolation.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // This should pass without any warnings or errors diff --git a/test/Concurrency/async_task_groups_and_actors.swift b/test/Concurrency/async_task_groups_and_actors.swift index b99e7f070e6..ae07d2c3e76 100644 --- a/test/Concurrency/async_task_groups_and_actors.swift +++ b/test/Concurrency/async_task_groups_and_actors.swift @@ -1,8 +1,8 @@ // RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts // REQUIRES: libdispatch +// REQUIRES: swift_feature_RegionBasedIsolation @MainActor class MyActor { diff --git a/test/Concurrency/async_task_groups_as_sequence.swift b/test/Concurrency/async_task_groups_as_sequence.swift index 49077c5fd28..e317699346a 100644 --- a/test/Concurrency/async_task_groups_as_sequence.swift +++ b/test/Concurrency/async_task_groups_as_sequence.swift @@ -4,8 +4,8 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts // REQUIRES: libdispatch +// REQUIRES: swift_feature_RegionBasedIsolation @available(SwiftStdlib 5.1, *) @rethrows diff --git a/test/Concurrency/async_task_locals_basic_warnings.swift b/test/Concurrency/async_task_locals_basic_warnings.swift index ec8906ff757..d82f3a5b6c6 100644 --- a/test/Concurrency/async_task_locals_basic_warnings.swift +++ b/test/Concurrency/async_task_locals_basic_warnings.swift @@ -5,7 +5,7 @@ // RUN: %target-swift-frontend -I %t -plugin-path %swift-plugin-dir -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation actor Test { diff --git a/test/Concurrency/async_throwing.swift b/test/Concurrency/async_throwing.swift index 8efc80a2217..9a25f486581 100644 --- a/test/Concurrency/async_throwing.swift +++ b/test/Concurrency/async_throwing.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // These tests cover various interactions with async functions that are // either throws or rethrows. diff --git a/test/Concurrency/attr_discardableResult_async_await.swift b/test/Concurrency/attr_discardableResult_async_await.swift index 0defcc5f1f1..d8f3e7f822c 100644 --- a/test/Concurrency/attr_discardableResult_async_await.swift +++ b/test/Concurrency/attr_discardableResult_async_await.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // https://github.com/apple/swift/issues/60276 diff --git a/test/Concurrency/closure_isolation.swift b/test/Concurrency/closure_isolation.swift index e6c63090b60..5fa93e00004 100644 --- a/test/Concurrency/closure_isolation.swift +++ b/test/Concurrency/closure_isolation.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -dump-ast %s -target %target-swift-5.1-abi-triple -enable-experimental-feature ClosureIsolation | %FileCheck %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_ClosureIsolation func acceptClosure(_: () -> T) { } func acceptSendableClosure(_: @Sendable () -> T) { } diff --git a/test/Concurrency/concurrency_module_shadowing.swift b/test/Concurrency/concurrency_module_shadowing.swift index 09b23e5cf83..a6d11b22ff6 100644 --- a/test/Concurrency/concurrency_module_shadowing.swift +++ b/test/Concurrency/concurrency_module_shadowing.swift @@ -8,7 +8,7 @@ // RUN: %target-swift-frontend -I %t -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation import ShadowsConcur diff --git a/test/Concurrency/concurrent_value_inference.swift b/test/Concurrency/concurrent_value_inference.swift index 0b25ab26698..a893da43368 100644 --- a/test/Concurrency/concurrent_value_inference.swift +++ b/test/Concurrency/concurrent_value_inference.swift @@ -2,7 +2,7 @@ // RUN: %target-swift-frontend -enable-library-evolution -strict-concurrency=complete %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation class C1 { } // expected-note {{class 'C1' does not conform to the 'Sendable' protocol}} final class C2: Sendable { } diff --git a/test/Concurrency/concurrent_value_inference_public.swift b/test/Concurrency/concurrent_value_inference_public.swift index b390c1077d7..8afeddd55a8 100644 --- a/test/Concurrency/concurrent_value_inference_public.swift +++ b/test/Concurrency/concurrent_value_inference_public.swift @@ -3,7 +3,7 @@ // RUN: %target-swift-frontend -enable-infer-public-sendable %s -emit-sil -o /dev/null -verify -strict-concurrency=complete // RUN: %target-swift-frontend -enable-infer-public-sendable %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation func acceptCV(_: T) { } diff --git a/test/Concurrency/concurrentfunction_capturediagnostics.swift b/test/Concurrency/concurrentfunction_capturediagnostics.swift index a3849cad1b3..841735096ba 100644 --- a/test/Concurrency/concurrentfunction_capturediagnostics.swift +++ b/test/Concurrency/concurrentfunction_capturediagnostics.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -print-diagnostic-groups -target %target-swift-5.1-abi-triple -enable-experimental-flow-sensitive-concurrent-captures -verify -emit-sil %s -o - >/dev/null -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation func f(_: @escaping @Sendable () -> Void) { } open class F { diff --git a/test/Concurrency/custom_executor_enqueue_availability.swift b/test/Concurrency/custom_executor_enqueue_availability.swift index 7d74a9b5fc4..7c354346268 100644 --- a/test/Concurrency/custom_executor_enqueue_availability.swift +++ b/test/Concurrency/custom_executor_enqueue_availability.swift @@ -5,7 +5,7 @@ // REQUIRES: concurrency // REQUIRES: OS=macosx -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // rdar://106849189 move-only types should be supported in freestanding mode // UNSUPPORTED: freestanding diff --git a/test/Concurrency/custom_executor_enqueue_deprecation_on_executor_extension.swift b/test/Concurrency/custom_executor_enqueue_deprecation_on_executor_extension.swift index b6bce465fa6..5171ac25730 100644 --- a/test/Concurrency/custom_executor_enqueue_deprecation_on_executor_extension.swift +++ b/test/Concurrency/custom_executor_enqueue_deprecation_on_executor_extension.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // rdar://106849189 move-only types should be supported in freestanding mode // UNSUPPORTED: freestanding diff --git a/test/Concurrency/custom_executor_enqueue_impls.swift b/test/Concurrency/custom_executor_enqueue_impls.swift index bd65849d5cc..2d5d9816075 100644 --- a/test/Concurrency/custom_executor_enqueue_impls.swift +++ b/test/Concurrency/custom_executor_enqueue_impls.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -print-diagnostic-groups -disable-availability-checking -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // rdar://106849189 move-only types should be supported in freestanding mode // UNSUPPORTED: freestanding diff --git a/test/Concurrency/default_actor_definit.swift b/test/Concurrency/default_actor_definit.swift index 6560fbd5889..e0881a4b0c5 100644 --- a/test/Concurrency/default_actor_definit.swift +++ b/test/Concurrency/default_actor_definit.swift @@ -4,8 +4,8 @@ // RUN: %target-swift-frontend -emit-sil %s -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation | %FileCheck %s // REQUIRES: concurrency -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_RegionBasedIsolation actor A { var x: String = "Hello" diff --git a/test/Concurrency/deinit_isolation.swift b/test/Concurrency/deinit_isolation.swift index 5278ec32c77..1add2a21f1c 100644 --- a/test/Concurrency/deinit_isolation.swift +++ b/test/Concurrency/deinit_isolation.swift @@ -3,6 +3,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library -enable-experimental-feature IsolatedDeinit -emit-silgen -DSILGEN %s | %FileCheck -check-prefix=CHECK-SYMB %s // REQUIRES: concurrency +// REQUIRES: swift_feature_IsolatedDeinit // Fixtures diff --git a/test/Concurrency/deinit_isolation_import/test.swift b/test/Concurrency/deinit_isolation_import/test.swift index 6dc1e3cd17c..40aa4fb169e 100644 --- a/test/Concurrency/deinit_isolation_import/test.swift +++ b/test/Concurrency/deinit_isolation_import/test.swift @@ -16,6 +16,7 @@ // REQUIRES: concurrency // REQUIRES: objc_interop +// REQUIRES: swift_feature_IsolatedDeinit // Note: intentionally importing Alpha implicitly import Beta diff --git a/test/Concurrency/deinit_isolation_in_value_types.swift b/test/Concurrency/deinit_isolation_in_value_types.swift index bb8bc4b5fc5..05a43b6fc3a 100644 --- a/test/Concurrency/deinit_isolation_in_value_types.swift +++ b/test/Concurrency/deinit_isolation_in_value_types.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -enable-experimental-feature IsolatedDeinit -parse-as-library -emit-silgen -verify %s +// REQUIRES: swift_feature_IsolatedDeinit + @globalActor final actor FirstActor { static let shared = FirstActor() } diff --git a/test/Concurrency/deinit_isolation_objc.swift b/test/Concurrency/deinit_isolation_objc.swift index 4bd7b1bfdf7..b0544ad9ae2 100644 --- a/test/Concurrency/deinit_isolation_objc.swift +++ b/test/Concurrency/deinit_isolation_objc.swift @@ -4,6 +4,7 @@ // REQUIRES: concurrency // REQUIRES: objc_interop +// REQUIRES: swift_feature_IsolatedDeinit import Foundation diff --git a/test/Concurrency/deinit_isolation_tbd.swift b/test/Concurrency/deinit_isolation_tbd.swift index 5ed6b66dc3e..95e08b0d955 100644 --- a/test/Concurrency/deinit_isolation_tbd.swift +++ b/test/Concurrency/deinit_isolation_tbd.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-experimental-feature IsolatedDeinit -emit-ir %s | %FileCheck %s +// REQUIRES: swift_feature_IsolatedDeinit + public class Foo { @MainActor deinit {} diff --git a/test/Concurrency/derived_conformances_nonisolated.swift b/test/Concurrency/derived_conformances_nonisolated.swift index 12d26cc8161..6c975ad5b06 100644 --- a/test/Concurrency/derived_conformances_nonisolated.swift +++ b/test/Concurrency/derived_conformances_nonisolated.swift @@ -2,7 +2,8 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability +// REQUIRES: swift_feature_RegionBasedIsolation @MainActor struct X1: Equatable, Hashable, Codable { diff --git a/test/Concurrency/dispatch_inference.swift b/test/Concurrency/dispatch_inference.swift index 6eae6016895..3884112b90a 100644 --- a/test/Concurrency/dispatch_inference.swift +++ b/test/Concurrency/dispatch_inference.swift @@ -5,7 +5,7 @@ // REQUIRES: concurrency // REQUIRES: libdispatch -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation import Dispatch diff --git a/test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis.swift b/test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis.swift index 35693bd937c..bade363e672 100644 --- a/test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis.swift +++ b/test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis.swift @@ -26,8 +26,8 @@ // RUN: -enable-upcoming-feature DynamicActorIsolation \ // RUN: %t/src/Client.swift -verify | %FileCheck %s -// REQUIRES: asserts // REQUIRES: concurrency +// REQUIRES: swift_feature_DynamicActorIsolation //--- API.swift public func compute(_: ((T) -> Void)?) {} diff --git a/test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis_objc.swift b/test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis_objc.swift index 16c14a6e90d..17a3cec27f6 100644 --- a/test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis_objc.swift +++ b/test/Concurrency/dynamic_checks_for_func_refs_in_preconcurrency_apis_objc.swift @@ -1,6 +1,6 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -target arm64-apple-macosx10.15 -enable-upcoming-feature DynamicActorIsolation -emit-silgen -verify %s | %FileCheck %s // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_DynamicActorIsolation import Foundation diff --git a/test/Concurrency/experimental_feature_strictconcurrency.swift b/test/Concurrency/experimental_feature_strictconcurrency.swift index d1ffba4fe75..3e104bf655c 100644 --- a/test/Concurrency/experimental_feature_strictconcurrency.swift +++ b/test/Concurrency/experimental_feature_strictconcurrency.swift @@ -3,7 +3,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -enable-upcoming-feature StrictConcurrency -emit-sil -o /dev/null -verify %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_StrictConcurrency class C1 { } // expected-note{{class 'C1' does not conform to the 'Sendable' protocol}} class C2 { } diff --git a/test/Concurrency/experimental_feature_strictconcurrency_targeted.swift b/test/Concurrency/experimental_feature_strictconcurrency_targeted.swift index 29b745ced5f..57b42e05f91 100644 --- a/test/Concurrency/experimental_feature_strictconcurrency_targeted.swift +++ b/test/Concurrency/experimental_feature_strictconcurrency_targeted.swift @@ -3,7 +3,8 @@ // RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete- -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation +// REQUIRES: swift_feature_StrictConcurrency class C { // expected-note {{class 'C' does not conform to the 'Sendable' protocol}} // expected-complete-note @-1 {{class 'C' does not conform to the 'Sendable' protocol}} diff --git a/test/Concurrency/flow_isolation.swift b/test/Concurrency/flow_isolation.swift index e7ae61170a3..e5830ee3341 100644 --- a/test/Concurrency/flow_isolation.swift +++ b/test/Concurrency/flow_isolation.swift @@ -1,6 +1,9 @@ // RUN: %target-swift-frontend -enable-experimental-feature IsolatedDeinit -strict-concurrency=complete -swift-version 5 -parse-as-library -emit-sil -verify %s // RUN: %target-swift-frontend -enable-experimental-feature IsolatedDeinit -strict-concurrency=complete -swift-version 5 -parse-as-library -emit-sil -verify %s -enable-upcoming-feature RegionBasedIsolation +// REQUIRES: swift_feature_RegionBasedIsolation +// REQUIRES: swift_feature_IsolatedDeinit + func randomBool() -> Bool { return false } func logTransaction(_ i: Int) {} diff --git a/test/Concurrency/global_actor_inference.swift b/test/Concurrency/global_actor_inference.swift index ec7e0a9083c..a02a1acaa14 100644 --- a/test/Concurrency/global_actor_inference.swift +++ b/test/Concurrency/global_actor_inference.swift @@ -7,7 +7,8 @@ // RUN: %target-swift-frontend -I %t -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -verify-additional-prefix complete-tns- -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability +// REQUIRES: swift_feature_RegionBasedIsolation import other_global_actor_inference diff --git a/test/Concurrency/global_actor_sendable_fn_type_inference.swift b/test/Concurrency/global_actor_sendable_fn_type_inference.swift index da6aedf3560..3a8cf577805 100644 --- a/test/Concurrency/global_actor_sendable_fn_type_inference.swift +++ b/test/Concurrency/global_actor_sendable_fn_type_inference.swift @@ -1,7 +1,8 @@ // RUN: %target-typecheck-verify-swift -strict-concurrency=complete -target %target-swift-5.1-abi-triple -enable-upcoming-feature RegionBasedIsolation -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability +// REQUIRES: swift_feature_RegionBasedIsolation func inferSendableFunctionType() { let closure: @MainActor () -> Void = {} diff --git a/test/Concurrency/global_function_pointer.swift b/test/Concurrency/global_function_pointer.swift index e2b57a6d77a..a9f80541227 100644 --- a/test/Concurrency/global_function_pointer.swift +++ b/test/Concurrency/global_function_pointer.swift @@ -10,6 +10,7 @@ // rdar://76038845 // REQUIRES: concurrency_runtime +// REQUIRES: swift_feature_SymbolLinkageMarkers // UNSUPPORTED: back_deployment_runtime @MainActor diff --git a/test/Concurrency/grouped_actor_isolation_diagnostics.swift b/test/Concurrency/grouped_actor_isolation_diagnostics.swift index c5e48c3e026..1add4b88a27 100644 --- a/test/Concurrency/grouped_actor_isolation_diagnostics.swift +++ b/test/Concurrency/grouped_actor_isolation_diagnostics.swift @@ -1,5 +1,6 @@ // RUN: %target-typecheck-verify-swift -target %target-swift-5.1-abi-triple -enable-experimental-feature GroupActorErrors -strict-concurrency=complete // REQUIRES: concurrency +// REQUIRES: swift_feature_GroupActorErrors @MainActor protocol P { diff --git a/test/Concurrency/hop_to_executor_unreachable_code.swift b/test/Concurrency/hop_to_executor_unreachable_code.swift index 6f8153d483a..44c6834451c 100644 --- a/test/Concurrency/hop_to_executor_unreachable_code.swift +++ b/test/Concurrency/hop_to_executor_unreachable_code.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -emit-sil -verify -o /dev/null %s -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // Check that the inserted hop-to-executor instructions don't cause a false // "unreachable code" warning. diff --git a/test/Concurrency/hoptomainactorifneeded.swift b/test/Concurrency/hoptomainactorifneeded.swift index 0f4f8dd6402..f854d948a6b 100644 --- a/test/Concurrency/hoptomainactorifneeded.swift +++ b/test/Concurrency/hoptomainactorifneeded.swift @@ -6,7 +6,7 @@ // hoptomainactorifneeded_interpreter. // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_GenerateForceToMainActorThunks // UNSUPPORTED: back_deployment_runtime // UNSUPPORTED: back_deploy_concurrency diff --git a/test/Concurrency/hoptomainactorifneeded_interpreter.swift b/test/Concurrency/hoptomainactorifneeded_interpreter.swift index be82d08595f..25c16aa11cf 100644 --- a/test/Concurrency/hoptomainactorifneeded_interpreter.swift +++ b/test/Concurrency/hoptomainactorifneeded_interpreter.swift @@ -12,10 +12,10 @@ // RUN: %target-codesign %t/main_crash // RUN: %target-run %t/main_crash %t/%target-library-name(PreconcurrencyUnchecked) -// REQUIRES: asserts // REQUIRES: executable_test // REQUIRES: concurrency // REQUIRES: objc_interop +// REQUIRES: swift_feature_GenerateForceToMainActorThunks // UNSUPPORTED: back_deployment_runtime // UNSUPPORTED: back_deploy_concurrency diff --git a/test/Concurrency/isolated_any.swift b/test/Concurrency/isolated_any.swift index 463fc1dc2d1..8a19f92f079 100644 --- a/test/Concurrency/isolated_any.swift +++ b/test/Concurrency/isolated_any.swift @@ -1,6 +1,6 @@ // RUN: %target-swift-frontend -typecheck -verify -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature InferSendableFromCaptures %s -// REQUIRES: asserts +// REQUIRES: swift_feature_InferSendableFromCaptures func globalNonisolatedFunction() {} @MainActor func globalMainActorFunction() {} diff --git a/test/Concurrency/isolated_default_argument_eval.swift b/test/Concurrency/isolated_default_argument_eval.swift index be380584e8a..0b88a483f49 100644 --- a/test/Concurrency/isolated_default_argument_eval.swift +++ b/test/Concurrency/isolated_default_argument_eval.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-emit-silgen -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature IsolatedDefaultValues -parse-as-library %s | %FileCheck %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_IsolatedDefaultValues @MainActor func requiresMainActor() -> Int { 0 } diff --git a/test/Concurrency/isolated_default_arguments.swift b/test/Concurrency/isolated_default_arguments.swift index b9e318a7272..5d5a7eeef2a 100644 --- a/test/Concurrency/isolated_default_arguments.swift +++ b/test/Concurrency/isolated_default_arguments.swift @@ -3,7 +3,9 @@ // RUN: %target-swift-frontend -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-upcoming-feature InferSendableFromCaptures %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_InferSendableFromCaptures +// REQUIRES: swift_feature_IsolatedDefaultValues +// REQUIRES: swift_feature_RegionBasedIsolation @globalActor actor SomeGlobalActor { diff --git a/test/Concurrency/isolated_default_arguments_serialized.swift b/test/Concurrency/isolated_default_arguments_serialized.swift index 1d3313d0dba..bc66aff5d77 100644 --- a/test/Concurrency/isolated_default_arguments_serialized.swift +++ b/test/Concurrency/isolated_default_arguments_serialized.swift @@ -5,6 +5,9 @@ // RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -disable-availability-checking -swift-version 5 -I %t -enable-upcoming-feature RegionBasedIsolation -enable-upcoming-feature IsolatedDefaultValues -enable-upcoming-feature StrictConcurrency // REQUIRES: concurrency +// REQUIRES: swift_feature_IsolatedDefaultValues +// REQUIRES: swift_feature_RegionBasedIsolation +// REQUIRES: swift_feature_StrictConcurrency import SerializedDefaultArguments diff --git a/test/Concurrency/isolated_default_property_inits.swift b/test/Concurrency/isolated_default_property_inits.swift index 9782d635a5b..63e1c251ba6 100644 --- a/test/Concurrency/isolated_default_property_inits.swift +++ b/test/Concurrency/isolated_default_property_inits.swift @@ -6,7 +6,8 @@ // RUN: %target-swift-frontend -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-upcoming-feature IsolatedDefaultValues -enable-upcoming-feature RegionBasedIsolation %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_IsolatedDefaultValues +// REQUIRES: swift_feature_RegionBasedIsolation // This tests errors emitted in definite initialization; this test file cannot // have any type checker errors. Type checker errors for IsolatedDefaultValues diff --git a/test/Concurrency/nonisolated_rules.swift b/test/Concurrency/nonisolated_rules.swift index 99cea6af290..6df631771a9 100644 --- a/test/Concurrency/nonisolated_rules.swift +++ b/test/Concurrency/nonisolated_rules.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -swift-version 6 -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorInferenceCutoff @MainActor protocol GloballyIsolated {} diff --git a/test/Concurrency/objc_async_overload.swift b/test/Concurrency/objc_async_overload.swift index 90303504113..78a99a7a42e 100644 --- a/test/Concurrency/objc_async_overload.swift +++ b/test/Concurrency/objc_async_overload.swift @@ -5,7 +5,8 @@ // REQUIRES: concurrency // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation +// REQUIRES: swift_feature_SendableCompletionHandlers // overload resolution should pick sync version in a sync context func syncContext() { diff --git a/test/Concurrency/objc_require_explicit_sendable.swift b/test/Concurrency/objc_require_explicit_sendable.swift index 16a84feec76..9997e00b6de 100644 --- a/test/Concurrency/objc_require_explicit_sendable.swift +++ b/test/Concurrency/objc_require_explicit_sendable.swift @@ -5,7 +5,7 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation import Foundation import ObjCConcurrency diff --git a/test/Concurrency/preconcurrency_conformances.swift b/test/Concurrency/preconcurrency_conformances.swift index 637c914c212..a52aa10f1bc 100644 --- a/test/Concurrency/preconcurrency_conformances.swift +++ b/test/Concurrency/preconcurrency_conformances.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -swift-version 5 -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -enable-upcoming-feature DynamicActorIsolation -strict-concurrency=complete -verify-additional-prefix complete-tns- // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_DynamicActorIsolation protocol Q { } diff --git a/test/Concurrency/preconcurrency_implementationonly_override.swift b/test/Concurrency/preconcurrency_implementationonly_override.swift index aaaaa0f29b5..4bc3b24b256 100644 --- a/test/Concurrency/preconcurrency_implementationonly_override.swift +++ b/test/Concurrency/preconcurrency_implementationonly_override.swift @@ -8,7 +8,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -I %t -enable-library-evolution -swift-version 5 -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @_implementationOnly import ImplementationOnlyDefs // expected-warning @-1 {{'@_implementationOnly' is deprecated, use 'internal import' instead}} diff --git a/test/Concurrency/preconcurrency_overload.swift b/test/Concurrency/preconcurrency_overload.swift index e466a9a26ec..e2c5c13c715 100644 --- a/test/Concurrency/preconcurrency_overload.swift +++ b/test/Concurrency/preconcurrency_overload.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -emit-sil -o /dev/null -verify %s -verify-additional-prefix complete-and-tns- -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // https://github.com/apple/swift/issues/59909 struct Future { } diff --git a/test/Concurrency/preconcurrency_typealias.swift b/test/Concurrency/preconcurrency_typealias.swift index 4142eee0551..2c96602867a 100644 --- a/test/Concurrency/preconcurrency_typealias.swift +++ b/test/Concurrency/preconcurrency_typealias.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -emit-sil -o /dev/null -verify %s -verify-additional-prefix complete-tns- -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @preconcurrency @MainActor func f() { } // expected-note @-1 2{{calls to global function 'f()' from outside of its actor context are implicitly asynchronous}} diff --git a/test/Concurrency/predates_concurrency.swift b/test/Concurrency/predates_concurrency.swift index 3bec7a6b3b3..360d8bff1e7 100644 --- a/test/Concurrency/predates_concurrency.swift +++ b/test/Concurrency/predates_concurrency.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -verify-additional-prefix complete-tns- // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @preconcurrency func unsafelySendableClosure(_ closure: @Sendable () -> Void) { } diff --git a/test/Concurrency/predates_concurrency_import.swift b/test/Concurrency/predates_concurrency_import.swift index 5a9466c7b3e..5e9536687d7 100644 --- a/test/Concurrency/predates_concurrency_import.swift +++ b/test/Concurrency/predates_concurrency_import.swift @@ -8,7 +8,7 @@ // RUN: %target-swift-frontend -I %t %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -parse-as-library -enable-upcoming-feature GlobalConcurrency // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalConcurrency @preconcurrency import NonStrictModule @_predatesConcurrency import StrictModule // expected-warning{{'@_predatesConcurrency' has been renamed to '@preconcurrency'}} diff --git a/test/Concurrency/predates_concurrency_import_emitmodule.swift b/test/Concurrency/predates_concurrency_import_emitmodule.swift index 6bc3ab60454..503a43eed0a 100644 --- a/test/Concurrency/predates_concurrency_import_emitmodule.swift +++ b/test/Concurrency/predates_concurrency_import_emitmodule.swift @@ -9,6 +9,7 @@ // RUN: %target-swift-frontend -emit-module -I %t -verify -primary-file %s -emit-module-path %t/predates_concurrency_import_swiftmodule.swiftmodule -experimental-skip-all-function-bodies -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency +// REQUIRES: swift_feature_RegionBasedIsolation @preconcurrency import NonStrictModule @preconcurrency import StrictModule diff --git a/test/Concurrency/radar_concurrency_nio.swift b/test/Concurrency/radar_concurrency_nio.swift index d36895e5d37..f4172d3463c 100644 --- a/test/Concurrency/radar_concurrency_nio.swift +++ b/test/Concurrency/radar_concurrency_nio.swift @@ -3,9 +3,9 @@ // RUN: %target-swift-frontend -enable-experimental-move-only -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete // RUN: %target-swift-frontend -enable-experimental-move-only -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -// REQUIRES: asserts // REQUIRES: concurrency +// REQUIRES: swift_feature_RegionBasedIsolation public protocol EventLoop: Sendable {} diff --git a/test/Concurrency/reasync.swift b/test/Concurrency/reasync.swift index 70caa1b909a..d04e1794588 100644 --- a/test/Concurrency/reasync.swift +++ b/test/Concurrency/reasync.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -enable-experimental-concurrency -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation //// Basic definitions and parsing diff --git a/test/Concurrency/require-explicit-sendable.swift b/test/Concurrency/require-explicit-sendable.swift index f225c7cab98..13426728946 100644 --- a/test/Concurrency/require-explicit-sendable.swift +++ b/test/Concurrency/require-explicit-sendable.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -require-explicit-sendable -strict-concurrency=complete %s -emit-sil -o /dev/null -verify // RUN: %target-swift-frontend -require-explicit-sendable -strict-concurrency=complete %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation public protocol P { } diff --git a/test/Concurrency/sendable_associated_type.swift b/test/Concurrency/sendable_associated_type.swift index 8db151f7790..c42d9300d92 100644 --- a/test/Concurrency/sendable_associated_type.swift +++ b/test/Concurrency/sendable_associated_type.swift @@ -2,7 +2,7 @@ // RUN: %target-swift-frontend -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -emit-sil -o /dev/null %s -verify // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation class C1 { } // expected-note{{class 'C1' does not conform to the 'Sendable' protocol}} @_nonSendable class C2 { } // expected-note{{conformance of 'C2' to 'Sendable' has been explicitly marked unavailable here}} diff --git a/test/Concurrency/sendable_conformance_checking.swift b/test/Concurrency/sendable_conformance_checking.swift index 502af6d5d16..786c02cb6ac 100644 --- a/test/Concurrency/sendable_conformance_checking.swift +++ b/test/Concurrency/sendable_conformance_checking.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify -verify-additional-prefix complete-and-tns- -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @available(SwiftStdlib 5.1, *) class NotSendable { // expected-note 9{{class 'NotSendable' does not conform to the 'Sendable' protocol}} diff --git a/test/Concurrency/sendable_cycle.swift b/test/Concurrency/sendable_cycle.swift index f82f756a3fd..b49d6612620 100644 --- a/test/Concurrency/sendable_cycle.swift +++ b/test/Concurrency/sendable_cycle.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend %S/Inputs/sendable_cycle_other.swift -target %target-swift-5.1-abi-triple %s -verify -emit-sil -o /dev/null -strict-concurrency=complete -verify-additional-prefix complete- -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation struct Bar { // expected-note*{{consider making struct 'Bar' conform to the 'Sendable' protocol}} lazy var foo = { // expected-error {{escaping closure captures mutating 'self' parameter}} diff --git a/test/Concurrency/sendable_existentials.swift b/test/Concurrency/sendable_existentials.swift index 733eb996336..9e8fb412886 100644 --- a/test/Concurrency/sendable_existentials.swift +++ b/test/Concurrency/sendable_existentials.swift @@ -4,7 +4,7 @@ // REQUIRES: concurrency // REQUIRES: OS=macosx -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @preconcurrency func send(_: Sendable) { } func sendOpt(_: Sendable?) { } diff --git a/test/Concurrency/sendable_functions.swift b/test/Concurrency/sendable_functions.swift index 874ff8c4a57..a753153f242 100644 --- a/test/Concurrency/sendable_functions.swift +++ b/test/Concurrency/sendable_functions.swift @@ -3,7 +3,7 @@ // RUN: %target-swift-frontend -emit-sil -o /dev/null -verify %s -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @Sendable func globalFunc() { } diff --git a/test/Concurrency/sendable_keypath-observe-objc.swift b/test/Concurrency/sendable_keypath-observe-objc.swift index 9e283b4cd18..edb19fa147c 100644 --- a/test/Concurrency/sendable_keypath-observe-objc.swift +++ b/test/Concurrency/sendable_keypath-observe-objc.swift @@ -2,7 +2,7 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_InferSendableFromCaptures // This is a copy of test/expr/primary/keypath/keypath-observe-objc.swift with additional requirements to test sendable key paths diff --git a/test/Concurrency/sendable_keypaths.swift b/test/Concurrency/sendable_keypaths.swift index ec7464aa7ba..47232b3d94f 100644 --- a/test/Concurrency/sendable_keypaths.swift +++ b/test/Concurrency/sendable_keypaths.swift @@ -1,7 +1,8 @@ // RUN: %target-typecheck-verify-swift -enable-upcoming-feature InferSendableFromCaptures -strict-concurrency=complete -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability +// REQUIRES: swift_feature_InferSendableFromCaptures class NonSendable : Hashable { var data: Int diff --git a/test/Concurrency/sendable_methods.swift b/test/Concurrency/sendable_methods.swift index 2ab99f2234a..83959f84f40 100644 --- a/test/Concurrency/sendable_methods.swift +++ b/test/Concurrency/sendable_methods.swift @@ -2,7 +2,7 @@ // RUN: %target-swift-emit-silgen %s -verify -enable-upcoming-feature InferSendableFromCaptures -disable-availability-checking -module-name sendable_methods -strict-concurrency=complete | %FileCheck %s // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_InferSendableFromCaptures func outer() { @Sendable func sendable() {} diff --git a/test/Concurrency/sendable_obc_protocol.swift b/test/Concurrency/sendable_obc_protocol.swift index eb93ec79b49..c055535ec53 100644 --- a/test/Concurrency/sendable_obc_protocol.swift +++ b/test/Concurrency/sendable_obc_protocol.swift @@ -5,7 +5,7 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation import Foundation diff --git a/test/Concurrency/sendable_objc_attr_in_type_context_swift5.swift b/test/Concurrency/sendable_objc_attr_in_type_context_swift5.swift index 82eaf9b7994..7cd0c4261b5 100644 --- a/test/Concurrency/sendable_objc_attr_in_type_context_swift5.swift +++ b/test/Concurrency/sendable_objc_attr_in_type_context_swift5.swift @@ -9,7 +9,7 @@ // RUN: -module-name main -I %t -verify // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers //--- Test.h #define SWIFT_SENDABLE __attribute__((__swift_attr__("@Sendable"))) diff --git a/test/Concurrency/sendable_objc_attr_in_type_context_swift5_strict.swift b/test/Concurrency/sendable_objc_attr_in_type_context_swift5_strict.swift index ebe2168c1f1..8cad2cb1613 100644 --- a/test/Concurrency/sendable_objc_attr_in_type_context_swift5_strict.swift +++ b/test/Concurrency/sendable_objc_attr_in_type_context_swift5_strict.swift @@ -10,7 +10,7 @@ // RUN: -module-name main -I %t -verify // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers //--- Test.h #define SWIFT_SENDABLE __attribute__((__swift_attr__("@Sendable"))) diff --git a/test/Concurrency/sendable_objc_attr_in_type_context_swift6.swift b/test/Concurrency/sendable_objc_attr_in_type_context_swift6.swift index 3089a6dfb70..985ced7d8f3 100644 --- a/test/Concurrency/sendable_objc_attr_in_type_context_swift6.swift +++ b/test/Concurrency/sendable_objc_attr_in_type_context_swift6.swift @@ -9,7 +9,7 @@ // RUN: -module-name main -I %t -verify // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers //--- Test.h #define SWIFT_SENDABLE __attribute__((__swift_attr__("@Sendable"))) diff --git a/test/Concurrency/sendable_override_checking.swift b/test/Concurrency/sendable_override_checking.swift index 95b2e70ee62..71916d2c743 100644 --- a/test/Concurrency/sendable_override_checking.swift +++ b/test/Concurrency/sendable_override_checking.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -verify -emit-sil -o /dev/null %s -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @available(SwiftStdlib 5.1, *) class NotSendable { // expected-note 2{{class 'NotSendable' does not conform to the 'Sendable' protocol}} diff --git a/test/Concurrency/sendable_preconcurrency_unused.swift b/test/Concurrency/sendable_preconcurrency_unused.swift index 1baa8ae6aee..53b6c9811d5 100644 --- a/test/Concurrency/sendable_preconcurrency_unused.swift +++ b/test/Concurrency/sendable_preconcurrency_unused.swift @@ -7,7 +7,7 @@ // RUN: %target-swift-frontend -disable-availability-checking -I %t -verify -emit-sil %s -o /dev/null -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @preconcurrency import NonStrictModule diff --git a/test/Concurrency/sendable_witness_check_delayed.swift b/test/Concurrency/sendable_witness_check_delayed.swift index 25949e34d7d..daf4bdc0477 100644 --- a/test/Concurrency/sendable_witness_check_delayed.swift +++ b/test/Concurrency/sendable_witness_check_delayed.swift @@ -3,7 +3,7 @@ // RUN: %target-swift-frontend -o /dev/null -emit-sil %s -verify -strict-concurrency=complete // RUN: %target-swift-frontend -o /dev/null -emit-sil %s -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // This triggers a conformance check with SuppressDiagnostics=true. let x = S().f {} diff --git a/test/Concurrency/sending_conditional_suppression.swift b/test/Concurrency/sending_conditional_suppression.swift index dbb4392e41c..b96f6d38205 100644 --- a/test/Concurrency/sending_conditional_suppression.swift +++ b/test/Concurrency/sending_conditional_suppression.swift @@ -2,7 +2,7 @@ // RUN: %target-swift-frontend -enable-upcoming-feature SendingArgsAndResults -swift-version 5 -enable-library-evolution -module-name test -emit-module -o %t/test.swiftmodule -emit-module-interface-path - -target %target-swift-5.1-abi-triple -Xllvm -swift-ast-printer-number-suppression-checks %s | %FileCheck %s -// REQUIRES: asserts +// REQUIRES: swift_feature_SendingArgsAndResults public class NonSendableKlass {} diff --git a/test/Concurrency/sending_continuation.swift b/test/Concurrency/sending_continuation.swift index d9fbca9132d..108b5055022 100644 --- a/test/Concurrency/sending_continuation.swift +++ b/test/Concurrency/sending_continuation.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -emit-sil -swift-version 6 -target %target-swift-5.1-abi-triple -enable-experimental-feature TransferringArgsAndResults -verify %s -o /dev/null -parse-as-library -// REQUIRES: asserts // REQUIRES: concurrency +// REQUIRES: swift_feature_TransferringArgsAndResults //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/task_local.swift b/test/Concurrency/task_local.swift index 692d58c1dfa..cbc372eed8a 100644 --- a/test/Concurrency/task_local.swift +++ b/test/Concurrency/task_local.swift @@ -3,7 +3,7 @@ // RUN: %target-swift-frontend -plugin-path %swift-plugin-dir -strict-concurrency=complete -verify-additional-prefix complete- -target %target-swift-5.1-abi-triple -emit-sil -verify -o /dev/null %s -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @available(SwiftStdlib 5.1, *) struct TL { diff --git a/test/Concurrency/taskgroup_cancelAll_from_child.swift b/test/Concurrency/taskgroup_cancelAll_from_child.swift index ffbfc75e5cf..a7e64a5e73f 100644 --- a/test/Concurrency/taskgroup_cancelAll_from_child.swift +++ b/test/Concurrency/taskgroup_cancelAll_from_child.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation @available(SwiftStdlib 5.1, *) func test_taskGroup_cancelAll() async { diff --git a/test/Concurrency/transfernonsendable.swift b/test/Concurrency/transfernonsendable.swift index 761843fda3d..969c66d57c4 100644 --- a/test/Concurrency/transfernonsendable.swift +++ b/test/Concurrency/transfernonsendable.swift @@ -7,7 +7,7 @@ // RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -disable-availability-checking -verify -verify-additional-prefix typechecker-only- -DTYPECHECKER_ONLY %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/transfernonsendable_asynclet.swift b/test/Concurrency/transfernonsendable_asynclet.swift index ddfcdb62682..238dc72761e 100644 --- a/test/Concurrency/transfernonsendable_asynclet.swift +++ b/test/Concurrency/transfernonsendable_asynclet.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -target %target-swift-5.1-abi-triple -verify %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/transfernonsendable_cfg.sil b/test/Concurrency/transfernonsendable_cfg.sil index 7134ada2975..94030571db3 100644 --- a/test/Concurrency/transfernonsendable_cfg.sil +++ b/test/Concurrency/transfernonsendable_cfg.sil @@ -1,5 +1,7 @@ // RUN: %target-sil-opt -transfer-non-sendable -enable-upcoming-feature RegionBasedIsolation -strict-concurrency=complete %s -verify +// REQUIRES: swift_feature_RegionBasedIsolation + // PLEASE READ THIS! // // In this file, we test out how the checker handles dataflow in a CFG. We want diff --git a/test/Concurrency/transfernonsendable_defer_and_typecheck_only.swift b/test/Concurrency/transfernonsendable_defer_and_typecheck_only.swift index 6e87d68e084..4ba64c8ebe4 100644 --- a/test/Concurrency/transfernonsendable_defer_and_typecheck_only.swift +++ b/test/Concurrency/transfernonsendable_defer_and_typecheck_only.swift @@ -1,7 +1,7 @@ // RUN: %target-typecheck-verify-swift -strict-concurrency=complete -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability /* This file tests the experimental TransferNonSendable feature. This feature causes the passing diff --git a/test/Concurrency/transfernonsendable_global_actor.swift b/test/Concurrency/transfernonsendable_global_actor.swift index b4d5d236721..63a857705fb 100644 --- a/test/Concurrency/transfernonsendable_global_actor.swift +++ b/test/Concurrency/transfernonsendable_global_actor.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -target %target-swift-5.1-abi-triple -verify -verify-additional-prefix tns- %s -o /dev/null -parse-as-library -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/transfernonsendable_instruction_matching.sil b/test/Concurrency/transfernonsendable_instruction_matching.sil index f2d7bf7efbd..872eb33162d 100644 --- a/test/Concurrency/transfernonsendable_instruction_matching.sil +++ b/test/Concurrency/transfernonsendable_instruction_matching.sil @@ -1,7 +1,7 @@ // RUN: %target-sil-opt -transfer-non-sendable -enable-upcoming-feature RegionBasedIsolation -strict-concurrency=complete %s -verify -o /dev/null // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // PLEASE READ THIS! // diff --git a/test/Concurrency/transfernonsendable_instruction_matching_opaquevalues.sil b/test/Concurrency/transfernonsendable_instruction_matching_opaquevalues.sil index b00d1501a5a..65b5754743f 100644 --- a/test/Concurrency/transfernonsendable_instruction_matching_opaquevalues.sil +++ b/test/Concurrency/transfernonsendable_instruction_matching_opaquevalues.sil @@ -1,8 +1,8 @@ // RUN: %target-sil-opt -transfer-non-sendable -enable-sil-opaque-values -enable-upcoming-feature RegionBasedIsolation -strict-concurrency=complete %s -verify -o /dev/null // REQUIRES: concurrency -// REQUIRES: asserts // REQUIRES: objc_interop +// REQUIRES: swift_feature_RegionBasedIsolation // PLEASE READ THIS! // diff --git a/test/Concurrency/transfernonsendable_isolationcrossing_partialapply.swift b/test/Concurrency/transfernonsendable_isolationcrossing_partialapply.swift index b116b29af97..c24a94e7781 100644 --- a/test/Concurrency/transfernonsendable_isolationcrossing_partialapply.swift +++ b/test/Concurrency/transfernonsendable_isolationcrossing_partialapply.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -disable-availability-checking -verify %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability // This test validates how we handle partial applies that are isolated to a // specific isolation domain (causing isolation crossings to occur). diff --git a/test/Concurrency/transfernonsendable_nonisolated.swift b/test/Concurrency/transfernonsendable_nonisolated.swift index 60376e7623a..73aaf5b8222 100644 --- a/test/Concurrency/transfernonsendable_nonisolated.swift +++ b/test/Concurrency/transfernonsendable_nonisolated.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -target %target-swift-5.1-abi-triple -verify %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability // This test validates behavior of transfernonsendable around nonisolated // functions and fields. diff --git a/test/Concurrency/transfernonsendable_nonisolatedunsafe.swift b/test/Concurrency/transfernonsendable_nonisolatedunsafe.swift index 52d299da100..5b67379d2ab 100644 --- a/test/Concurrency/transfernonsendable_nonisolatedunsafe.swift +++ b/test/Concurrency/transfernonsendable_nonisolatedunsafe.swift @@ -4,7 +4,7 @@ // nonisolated(unsafe). // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/transfernonsendable_objc.swift b/test/Concurrency/transfernonsendable_objc.swift index f1a6ab37c5b..b726878b9c7 100644 --- a/test/Concurrency/transfernonsendable_objc.swift +++ b/test/Concurrency/transfernonsendable_objc.swift @@ -1,7 +1,8 @@ // RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -target %target-swift-5.1-abi-triple %s -o /dev/null -import-objc-header %S/Inputs/transfernonsendable_objc.h -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability +// REQUIRES: swift_feature_RegionBasedIsolation import Foundation diff --git a/test/Concurrency/transfernonsendable_ownership.swift b/test/Concurrency/transfernonsendable_ownership.swift index 0b0900fe1e8..906043ba5e8 100644 --- a/test/Concurrency/transfernonsendable_ownership.swift +++ b/test/Concurrency/transfernonsendable_ownership.swift @@ -5,7 +5,7 @@ // parameters. // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/transfernonsendable_region_based_sendability.swift b/test/Concurrency/transfernonsendable_region_based_sendability.swift index 824bc3471fd..c12215a960c 100644 --- a/test/Concurrency/transfernonsendable_region_based_sendability.swift +++ b/test/Concurrency/transfernonsendable_region_based_sendability.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -strict-concurrency=complete -target %target-swift-5.1-abi-triple -parse-as-library -emit-sil -o /dev/null -verify -verify-additional-prefix tns- %s -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability /* This file tests the early features of the flow-sensitive Sendable checking implemented by the TransferNonSendable SIL pass. diff --git a/test/Concurrency/transfernonsendable_sending_params.swift b/test/Concurrency/transfernonsendable_sending_params.swift index 398aa445a89..647a71174ff 100644 --- a/test/Concurrency/transfernonsendable_sending_params.swift +++ b/test/Concurrency/transfernonsendable_sending_params.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -emit-sil -parse-as-library -target %target-swift-5.1-abi-triple -strict-concurrency=complete -verify %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/transfernonsendable_sending_results.swift b/test/Concurrency/transfernonsendable_sending_results.swift index 9440aecbd8e..72fdd4adfa3 100644 --- a/test/Concurrency/transfernonsendable_sending_results.swift +++ b/test/Concurrency/transfernonsendable_sending_results.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -emit-sil -parse-as-library -strict-concurrency=complete -target %target-swift-5.1-abi-triple -verify %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability //////////////////////// // MARK: Declarations // diff --git a/test/Concurrency/transfernonsendable_unavailable_conformance.swift b/test/Concurrency/transfernonsendable_unavailable_conformance.swift index 9f11857bc4a..883b1447b07 100644 --- a/test/Concurrency/transfernonsendable_unavailable_conformance.swift +++ b/test/Concurrency/transfernonsendable_unavailable_conformance.swift @@ -1,7 +1,8 @@ // RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -target %target-swift-5.1-abi-triple -verify %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability +// REQUIRES: swift_feature_RegionBasedIsolation // This test makes sure that we treat types with an unavailable Sendable // conformance as being non-Sendable. diff --git a/test/Concurrency/unsafe_inherit_executor.swift b/test/Concurrency/unsafe_inherit_executor.swift index a912e7ca582..f00de571641 100644 --- a/test/Concurrency/unsafe_inherit_executor.swift +++ b/test/Concurrency/unsafe_inherit_executor.swift @@ -3,7 +3,7 @@ // RUN: %target-swift-frontend -plugin-path %swift-plugin-dir -emit-sil -o /dev/null -verify -disable-availability-checking %s -strict-concurrency=complete // RUN: %target-swift-frontend -plugin-path %swift-plugin-dir -emit-sil -o /dev/null -verify -disable-availability-checking %s -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation // expected-error @+1 {{non-async functions cannot inherit an executor}} @_unsafeInheritExecutor diff --git a/test/Concurrency/voucher_propagation.swift b/test/Concurrency/voucher_propagation.swift index f67623bb51d..f18e8fe9d77 100644 --- a/test/Concurrency/voucher_propagation.swift +++ b/test/Concurrency/voucher_propagation.swift @@ -13,6 +13,7 @@ // UNSUPPORTED: back_deployment_runtime // REQUIRES: OS=macosx +// REQUIRES: swift_feature_IsolatedDeinit import Darwin import Dispatch // expected-warning {{add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Dispatch'}} diff --git a/test/ConstExtraction/ExtractConstantsFromMembersAttribute.swift b/test/ConstExtraction/ExtractConstantsFromMembersAttribute.swift index d06ecd3cd58..d729a395766 100644 --- a/test/ConstExtraction/ExtractConstantsFromMembersAttribute.swift +++ b/test/ConstExtraction/ExtractConstantsFromMembersAttribute.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -typecheck -emit-const-values-path %t/ExtractConstantsFromMembersAttribute.swiftconstvalues -const-gather-protocols-file %t/protocols.json -primary-file %s -enable-experimental-feature ExtractConstantsFromMembers // RUN: cat %t/ExtractConstantsFromMembersAttribute.swiftconstvalues 2>&1 | %FileCheck %s -// REQUIRES: asserts +// REQUIRES: swift_feature_ExtractConstantsFromMembers @extractConstantsFromMembers protocol MyProto {} public struct TestStruct : MyProto { diff --git a/test/Constraints/implicit_last_exprs_double_cgfloat_conversion.swift b/test/Constraints/implicit_last_exprs_double_cgfloat_conversion.swift index da2656582b1..2204ead0978 100644 --- a/test/Constraints/implicit_last_exprs_double_cgfloat_conversion.swift +++ b/test/Constraints/implicit_last_exprs_double_cgfloat_conversion.swift @@ -1,9 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ImplicitLastExprResults %clang-importer-sdk // REQUIRES: objc_interop - -// Experimental feature requires asserts -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitLastExprResults import Foundation diff --git a/test/Constraints/opened_existentials_feature.swift b/test/Constraints/opened_existentials_feature.swift index b1fc362cd11..fdb1efea792 100644 --- a/test/Constraints/opened_existentials_feature.swift +++ b/test/Constraints/opened_existentials_feature.swift @@ -1,6 +1,8 @@ // RUN: %target-typecheck-verify-swift -enable-upcoming-feature ImplicitOpenExistentials // RUN: %target-typecheck-verify-swift -swift-version 6 +// REQUIRES: swift_feature_ImplicitOpenExistentials + #if _runtime(_ObjC) @objc protocol X {} diff --git a/test/Constraints/then_stmt.swift b/test/Constraints/then_stmt.swift index ed0eb0dea86..112f3545270 100644 --- a/test/Constraints/then_stmt.swift +++ b/test/Constraints/then_stmt.swift @@ -1,7 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ThenStatements -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_ThenStatements enum E { case e diff --git a/test/DebugInfo/embedded.swift b/test/DebugInfo/embedded.swift index 4d6d6a5d6a3..995d12d0261 100644 --- a/test/DebugInfo/embedded.swift +++ b/test/DebugInfo/embedded.swift @@ -7,5 +7,6 @@ // REQUIRES: executable_test // REQUIRES: OS=macosx // REQUIRES: embedded_stdlib +// REQUIRES: swift_feature_Embedded // CHECK: !DICompileUnit({{.*}}flags: "-enable-embedded-swift" diff --git a/test/DebugInfo/raw_layout.swift b/test/DebugInfo/raw_layout.swift index 37f11388848..c87a2232ef1 100644 --- a/test/DebugInfo/raw_layout.swift +++ b/test/DebugInfo/raw_layout.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend %s -enable-experimental-feature RawLayout -emit-ir -g -o - | %FileCheck %s +// REQUIRES: swift_feature_RawLayout + @_rawLayout(size: 12, alignment: 4) // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "S8_4" // CHECK-SAME: size: 96, diff --git a/test/DebugInfo/sending_params_and_results.swift b/test/DebugInfo/sending_params_and_results.swift index 708500e15e2..0e4c97dadab 100644 --- a/test/DebugInfo/sending_params_and_results.swift +++ b/test/DebugInfo/sending_params_and_results.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -emit-ir -g -o - -module-name test -strict-concurrency=complete -swift-version 5 -enable-upcoming-feature SendingArgsAndResults -target %target-swift-5.1-abi-triple %s | %FileCheck %s +// REQUIRES: swift_feature_SendingArgsAndResults + // Test that we can properly reconstruct sending from various tests when // emitting debug info. Only place examples in here that have already failed. diff --git a/test/DebugInfo/value-generics.swift b/test/DebugInfo/value-generics.swift index 4d5b977c336..0cb8fdfab38 100644 --- a/test/DebugInfo/value-generics.swift +++ b/test/DebugInfo/value-generics.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend %s -emit-ir -g -enable-builtin-module -enable-experimental-feature ValueGenerics -disable-experimental-parser-round-trip -disable-availability-checking -o - | %FileCheck %s +// REQUIRES: swift_feature_ValueGenerics + import Builtin struct Vector: ~Copyable { diff --git a/test/Distributed/Runtime/distributed_actor_deinit.swift b/test/Distributed/Runtime/distributed_actor_deinit.swift index 46ce8e9e136..1b02137e75a 100644 --- a/test/Distributed/Runtime/distributed_actor_deinit.swift +++ b/test/Distributed/Runtime/distributed_actor_deinit.swift @@ -7,6 +7,7 @@ // REQUIRES: executable_test // REQUIRES: concurrency // REQUIRES: distributed +// REQUIRES: swift_feature_IsolatedDeinit // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/Distributed/Runtime/distributed_actor_remote_fieldsDontCrashDeinit.swift b/test/Distributed/Runtime/distributed_actor_remote_fieldsDontCrashDeinit.swift index be2c1650b55..477b0b32982 100644 --- a/test/Distributed/Runtime/distributed_actor_remote_fieldsDontCrashDeinit.swift +++ b/test/Distributed/Runtime/distributed_actor_remote_fieldsDontCrashDeinit.swift @@ -7,6 +7,7 @@ // REQUIRES: executable_test // REQUIRES: concurrency // REQUIRES: distributed +// REQUIRES: swift_feature_IsolatedDeinit // rdar://76038845 // UNSUPPORTED: use_os_stdlib diff --git a/test/Distributed/Runtime/distributed_actor_remote_retains_system.swift b/test/Distributed/Runtime/distributed_actor_remote_retains_system.swift index 05601be8752..8181d2b2ddc 100644 --- a/test/Distributed/Runtime/distributed_actor_remote_retains_system.swift +++ b/test/Distributed/Runtime/distributed_actor_remote_retains_system.swift @@ -3,6 +3,7 @@ // REQUIRES: executable_test // REQUIRES: concurrency // REQUIRES: distributed +// REQUIRES: swift_feature_IsolatedDeinit // rdar://76038845 // UNSUPPORTED: use_os_stdlib diff --git a/test/Frontend/enable_builtin_module.swift b/test/Frontend/enable_builtin_module.swift index 28aaf75d2fc..15a29e3824a 100644 --- a/test/Frontend/enable_builtin_module.swift +++ b/test/Frontend/enable_builtin_module.swift @@ -3,6 +3,8 @@ // RUN: %target-swift-frontend -typecheck -enable-builtin-module -D BUILTIN_IMPORT %s // RUN: %target-swift-frontend -typecheck -enable-experimental-feature BuiltinModule -D BUILTIN_IMPORT %s +// REQUIRES: swift_feature_BuiltinModule + // CHECK-NO-BUILTIN: no such module 'Builtin' #if BUILTIN_IMPORT diff --git a/test/Frontend/experimental-features-asserts.swift b/test/Frontend/experimental-features-asserts.swift index ad764d1ce76..9744e1f5795 100644 --- a/test/Frontend/experimental-features-asserts.swift +++ b/test/Frontend/experimental-features-asserts.swift @@ -2,6 +2,8 @@ // an asserts compilers. // REQUIRES: asserts +// REQUIRES: swift_feature_AccessLevelOnImport +// REQUIRES: swift_feature_ParserValidation // 'AccessLevelOnImport' is allowed in production // RUN: %target-swift-frontend -typecheck %s -enable-experimental-feature AccessLevelOnImport -verify diff --git a/test/Frontend/experimental-features-no-asserts.swift b/test/Frontend/experimental-features-no-asserts.swift index 60957d37edc..777be3e5251 100644 --- a/test/Frontend/experimental-features-no-asserts.swift +++ b/test/Frontend/experimental-features-no-asserts.swift @@ -2,6 +2,7 @@ // are not allowed non-production compilers. // REQUIRES: no_asserts +// REQUIRES: swift_feature_AccessLevelOnImport // 'AccessLevelOnImport' is allowed in production // RUN: %target-swift-frontend -typecheck %s -enable-experimental-feature AccessLevelOnImport -verify diff --git a/test/Frontend/upcoming_feature.swift b/test/Frontend/upcoming_feature.swift index 61dfdf9cf68..72a4f32b588 100644 --- a/test/Frontend/upcoming_feature.swift +++ b/test/Frontend/upcoming_feature.swift @@ -20,6 +20,9 @@ // RUN: not %target-swift-frontend -typecheck -enable-upcoming-feature ConciseMagicFile -swift-version 6 %s 2>&1 | %FileCheck %s --check-prefix=CHECK-ERROR // RUN: %target-swift-frontend -typecheck -enable-experimental-feature ConciseMagicFile -swift-version 6 %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WARN +// REQUIRES: swift_feature_ConciseMagicFile +// REQUIRES: !swift_feature_UnknownFeature + // CHECK-ERROR: error: upcoming feature 'ConciseMagicFile' is already enabled as of Swift version 6 // CHECK-WARN: warning: upcoming feature 'ConciseMagicFile' is already enabled as of Swift version 6 diff --git a/test/Generics/copyable_and_self_conforming_protocols.swift b/test/Generics/copyable_and_self_conforming_protocols.swift index 0edfdf0c3db..104b9d2b237 100644 --- a/test/Generics/copyable_and_self_conforming_protocols.swift +++ b/test/Generics/copyable_and_self_conforming_protocols.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -enable-experimental-feature NonescapableTypes %s -verify // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_NonescapableTypes import Foundation diff --git a/test/Generics/inverse_associatedtype_restriction.swift b/test/Generics/inverse_associatedtype_restriction.swift index 4a005e1cb51..8bd4c7407e7 100644 --- a/test/Generics/inverse_associatedtype_restriction.swift +++ b/test/Generics/inverse_associatedtype_restriction.swift @@ -1,6 +1,8 @@ // RUN: %target-typecheck-verify-swift \ // RUN: -enable-experimental-feature NonescapableTypes +// REQUIRES: swift_feature_NonescapableTypes + // The restriction is that we don't permit suppression requirements on // associated types without an experimental feature for that. diff --git a/test/Generics/inverse_casting_availability.swift b/test/Generics/inverse_casting_availability.swift index 37258539c1a..18a83c3f34d 100644 --- a/test/Generics/inverse_casting_availability.swift +++ b/test/Generics/inverse_casting_availability.swift @@ -3,6 +3,7 @@ // RUN: -enable-experimental-feature NonescapableTypes // REQUIRES: OS=macosx || OS=ios || OS=tvos || OS=watchOS || OS=xros +// REQUIRES: swift_feature_NonescapableTypes protocol P {} struct NCG {} diff --git a/test/Generics/inverse_classes1.swift b/test/Generics/inverse_classes1.swift index eb8c9587f3b..b8953c67e85 100644 --- a/test/Generics/inverse_classes1.swift +++ b/test/Generics/inverse_classes1.swift @@ -1,6 +1,8 @@ // RUN: %target-typecheck-verify-swift \ // RUN: -enable-experimental-feature MoveOnlyClasses +// REQUIRES: swift_feature_MoveOnlyClasses + class KlassModern: ~Copyable {} class Konditional {} diff --git a/test/Generics/inverse_conditional_conformance_restriction.swift b/test/Generics/inverse_conditional_conformance_restriction.swift index f44b00a6a87..ab420c727f9 100644 --- a/test/Generics/inverse_conditional_conformance_restriction.swift +++ b/test/Generics/inverse_conditional_conformance_restriction.swift @@ -2,6 +2,9 @@ // RUN: -enable-experimental-feature NonescapableTypes \ // RUN: -enable-experimental-feature SuppressedAssociatedTypes +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes + protocol P {} protocol Q {} class DoggoClass {} diff --git a/test/Generics/inverse_extension_signatures.swift b/test/Generics/inverse_extension_signatures.swift index 779b93dc622..3352a3580fc 100644 --- a/test/Generics/inverse_extension_signatures.swift +++ b/test/Generics/inverse_extension_signatures.swift @@ -3,6 +3,8 @@ // RUN: -verify -typecheck %s -debug-generic-signatures \ // RUN: -debug-inverse-requirements 2>&1 | %FileCheck %s --implicit-check-not "error:" +// REQUIRES: swift_feature_NonescapableTypes + // CHECK-LABEL: .Outer@ // CHECK: Generic signature: diff --git a/test/Generics/inverse_extensions.swift b/test/Generics/inverse_extensions.swift index 7ff07abcee4..e99bc6858c6 100644 --- a/test/Generics/inverse_extensions.swift +++ b/test/Generics/inverse_extensions.swift @@ -2,6 +2,9 @@ // RUN: -enable-experimental-feature NonescapableTypes \ // RUN: -enable-experimental-feature SuppressedAssociatedTypes +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes + struct Turtle {} extension Turtle where T: ~Copyable {} // expected-error {{'T' required to be 'Copyable' but is marked with '~Copyable'}} diff --git a/test/Generics/inverse_generics.swift b/test/Generics/inverse_generics.swift index 2bf1a5c33a2..b32ecdbf5a0 100644 --- a/test/Generics/inverse_generics.swift +++ b/test/Generics/inverse_generics.swift @@ -2,6 +2,9 @@ // RUN: -enable-experimental-feature NonescapableTypes \ // RUN: -enable-experimental-feature SuppressedAssociatedTypes +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes + // expected-note@+1 {{'T' has '~Copyable' constraint preventing implicit 'Copyable' conformance}} struct AttemptImplicitConditionalConformance: ~Copyable { var t: T // expected-error {{stored property 't' of 'Copyable'-conforming generic struct 'AttemptImplicitConditionalConformance' has non-Copyable type 'T'}} diff --git a/test/Generics/inverse_generics_stdlib.swift b/test/Generics/inverse_generics_stdlib.swift index 200df47bd34..bb0e2468ed6 100644 --- a/test/Generics/inverse_generics_stdlib.swift +++ b/test/Generics/inverse_generics_stdlib.swift @@ -1,5 +1,8 @@ // RUN: %target-typecheck-verify-swift -parse-stdlib -module-name Swift -enable-experimental-feature BuiltinModule -enable-experimental-feature NonescapableTypes +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_NonescapableTypes + /// This test specifically covers constructs that are only valid in the stdlib. diff --git a/test/Generics/inverse_scoping.swift b/test/Generics/inverse_scoping.swift index dbe4df360ca..4a7f5751526 100644 --- a/test/Generics/inverse_scoping.swift +++ b/test/Generics/inverse_scoping.swift @@ -1,5 +1,8 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature NonescapableTypes -enable-experimental-feature SuppressedAssociatedTypes +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes + protocol NoCopyReq: ~Copyable {} diff --git a/test/Generics/inverse_signatures.swift b/test/Generics/inverse_signatures.swift index 4ee2394cac8..e5341e5ff6c 100644 --- a/test/Generics/inverse_signatures.swift +++ b/test/Generics/inverse_signatures.swift @@ -4,6 +4,9 @@ // RUN: -verify -typecheck %s -debug-generic-signatures \ // RUN: -debug-inverse-requirements 2>&1 | %FileCheck %s --implicit-check-not "error:" +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes + // CHECK-LABEL: (file).genericFn@ // CHECK: Generic signature: func genericFn(_ t: T) {} diff --git a/test/Generics/parameter-pack-same-element-requirements.swift b/test/Generics/parameter-pack-same-element-requirements.swift index eb29574d36d..d9caffb4337 100644 --- a/test/Generics/parameter-pack-same-element-requirements.swift +++ b/test/Generics/parameter-pack-same-element-requirements.swift @@ -1,6 +1,6 @@ // RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures -enable-experimental-feature SameElementRequirements -disable-availability-checking 2>&1 | %FileCheck %s -dump-input=fail -// REQUIRES: asserts +// REQUIRES: swift_feature_SameElementRequirements protocol P { associatedtype A diff --git a/test/Generics/tuple-conformances.swift b/test/Generics/tuple-conformances.swift index e06d7a6c802..2982b35f335 100644 --- a/test/Generics/tuple-conformances.swift +++ b/test/Generics/tuple-conformances.swift @@ -1,7 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature TupleConformances -// Because of -enable-experimental-feature TupleConformances -// REQUIRES: asserts +// REQUIRES: swift_feature_TupleConformances extension () { // expected-error@-1 {{tuple extension must be written as extension of '(repeat each Element)'}} diff --git a/test/IDE/complete_embedded_linux.swift b/test/IDE/complete_embedded_linux.swift index 54d082f4dac..998402d0d65 100644 --- a/test/IDE/complete_embedded_linux.swift +++ b/test/IDE/complete_embedded_linux.swift @@ -1,7 +1,7 @@ -// REQUIRES: asserts // REQUIRES: swift_in_compiler // REQUIRES: OS=linux-gnu // REQUIRES: embedded_stdlib +// REQUIRES: swift_feature_Embedded // RUN: %batch-code-completion -enable-experimental-feature Embedded func test() { diff --git a/test/IDE/complete_embedded_macos.swift b/test/IDE/complete_embedded_macos.swift index f134cffbfd2..dff5eca3fd8 100644 --- a/test/IDE/complete_embedded_macos.swift +++ b/test/IDE/complete_embedded_macos.swift @@ -1,7 +1,7 @@ -// REQUIRES: asserts // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx // REQUIRES: embedded_stdlib +// REQUIRES: swift_feature_Embedded // RUN: %batch-code-completion -target %target-cpu-apple-macos14 -enable-experimental-feature Embedded func test() { diff --git a/test/IDE/complete_implicit_last_expr.swift b/test/IDE/complete_implicit_last_expr.swift index 54f3f159d46..a7b595a98ef 100644 --- a/test/IDE/complete_implicit_last_expr.swift +++ b/test/IDE/complete_implicit_last_expr.swift @@ -1,7 +1,6 @@ // RUN: %batch-code-completion -enable-experimental-feature ImplicitLastExprResults -debug-forbid-typecheck-prefix FORBIDDEN -// Experimental feature requires asserts -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitLastExprResults enum E { case e diff --git a/test/IDE/complete_then_stmt.swift b/test/IDE/complete_then_stmt.swift index 1a58401f355..bf34ef56272 100644 --- a/test/IDE/complete_then_stmt.swift +++ b/test/IDE/complete_then_stmt.swift @@ -1,7 +1,6 @@ // RUN: %batch-code-completion -enable-experimental-feature ThenStatements -debug-forbid-typecheck-prefix FORBIDDEN -// Experimental feature requires asserts -// REQUIRES: asserts +// REQUIRES: swift_feature_ThenStatements enum E { case e diff --git a/test/IDE/print_clang_ObjectiveC.swift b/test/IDE/print_clang_ObjectiveC.swift index ac369976753..1300b8b82e9 100644 --- a/test/IDE/print_clang_ObjectiveC.swift +++ b/test/IDE/print_clang_ObjectiveC.swift @@ -9,6 +9,7 @@ // RUN: %FileCheck -input-file %t/ObjectiveC.NSObject.forward-decls.txt -check-prefix=NEGATIVE %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_ImportObjcForwardDeclarations // NEGATIVE-WITHOUT-FORWARD-DECLS-NOT: var description // NEGATIVE-NOT: NSCoder diff --git a/test/IDE/print_clang_objc_async.swift b/test/IDE/print_clang_objc_async.swift index 10705dd4832..633963599e7 100644 --- a/test/IDE/print_clang_objc_async.swift +++ b/test/IDE/print_clang_objc_async.swift @@ -5,7 +5,7 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers import _Concurrency // CHECK-LABEL: class SlowServer : NSObject, ServiceProvider { diff --git a/test/IDE/print_clang_objc_effectful_properties.swift b/test/IDE/print_clang_objc_effectful_properties.swift index ea9a5212091..87a20fd9f3c 100644 --- a/test/IDE/print_clang_objc_effectful_properties.swift +++ b/test/IDE/print_clang_objc_effectful_properties.swift @@ -5,7 +5,7 @@ // REQUIRES: concurrency // REQUIRES: objc_interop -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers // CHECK-LABEL: class EffProps : NSObject { // CHECK: @available(*, renamed: "getter:doggo()") diff --git a/test/IDE/print_objc_concurrency_interface.swift b/test/IDE/print_objc_concurrency_interface.swift index ee15af04528..01eb0d08163 100644 --- a/test/IDE/print_objc_concurrency_interface.swift +++ b/test/IDE/print_objc_concurrency_interface.swift @@ -7,7 +7,7 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers import _Concurrency // CHECK-LABEL: class SlowServer : NSObject, ServiceProvider { diff --git a/test/IDE/print_omit_needless_words.swift b/test/IDE/print_omit_needless_words.swift index b20efd823b5..4a73c02eba1 100644 --- a/test/IDE/print_omit_needless_words.swift +++ b/test/IDE/print_omit_needless_words.swift @@ -3,7 +3,7 @@ // REQUIRES: objc_interop // FIXME: this is failing on simulators // REQUIRES: OS=macosx -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC.swift -disable-objc-attr-requires-foundation-module -enable-experimental-feature SendableCompletionHandlers // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %S/../Inputs/clang-importer-sdk/swift-modules/CoreGraphics.swift -enable-experimental-feature SendableCompletionHandlers diff --git a/test/IRGen/bitwise-copyable-derived-loadRaw.swift b/test/IRGen/bitwise-copyable-derived-loadRaw.swift index 83f5c4b5177..953273b68a4 100644 --- a/test/IRGen/bitwise-copyable-derived-loadRaw.swift +++ b/test/IRGen/bitwise-copyable-derived-loadRaw.swift @@ -1,6 +1,7 @@ // RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-experimental-feature BuiltinModule) | %FileCheck %s // REQUIRES: executable_test +// REQUIRES: swift_feature_BuiltinModule // Execute an unaligned load of SIMD16 which conforms to a protocol derived from BitwiseCopyable. diff --git a/test/IRGen/bitwise-copyable-loadRaw.swift b/test/IRGen/bitwise-copyable-loadRaw.swift index fa5c9e5d94a..50fca100172 100644 --- a/test/IRGen/bitwise-copyable-loadRaw.swift +++ b/test/IRGen/bitwise-copyable-loadRaw.swift @@ -1,6 +1,7 @@ // RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-experimental-feature BuiltinModule -Xfrontend -disable-availability-checking) | %FileCheck %s // REQUIRES: executable_test +// REQUIRES: swift_feature_BuiltinModule // Execute an unaligned load of SIMD16 which retroactively conforms directly to BitwiseCopyable. diff --git a/test/IRGen/builtin_freeze.swift b/test/IRGen/builtin_freeze.swift index 94a8a8d4129..10a0af7c5a4 100644 --- a/test/IRGen/builtin_freeze.swift +++ b/test/IRGen/builtin_freeze.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -O -module-name builtin_freeze -enable-experimental-feature BuiltinModule -primary-file %s -emit-ir -o - | %FileCheck %s --check-prefix=CHECK +// REQUIRES: swift_feature_BuiltinModule + import Builtin func fptosi(_ x: Float) -> Int32 { diff --git a/test/IRGen/builtin_vector_fixed_array.sil b/test/IRGen/builtin_vector_fixed_array.sil index 5c8f9304d39..b4e5feda209 100644 --- a/test/IRGen/builtin_vector_fixed_array.sil +++ b/test/IRGen/builtin_vector_fixed_array.sil @@ -1,4 +1,7 @@ // RUN: %target-swift-frontend -emit-irgen -disable-availability-checking -enable-experimental-feature ValueGenerics -enable-experimental-feature BuiltinModule %s | %FileCheck %s + +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_ValueGenerics import Builtin import Swift diff --git a/test/IRGen/coroutine_accessors.swift b/test/IRGen/coroutine_accessors.swift index b380346478b..fbf280f1df5 100644 --- a/test/IRGen/coroutine_accessors.swift +++ b/test/IRGen/coroutine_accessors.swift @@ -12,7 +12,9 @@ // RUN: -enable-experimental-feature CoroutineAccessors \ // RUN: -enable-experimental-feature CoroutineAccessorsAllocateInCallee -// REQUIRES: asserts +// REQUIRES: swift_feature_CoroutineAccessors +// REQUIRES: swift_feature_CoroutineAccessorsAllocateInCallee + @frozen public struct S { diff --git a/test/IRGen/existential-bitwise-borrowability.swift b/test/IRGen/existential-bitwise-borrowability.swift index 6b83a999ebb..b5db0d277b2 100644 --- a/test/IRGen/existential-bitwise-borrowability.swift +++ b/test/IRGen/existential-bitwise-borrowability.swift @@ -2,6 +2,9 @@ // RUN: %{python} %utils/chex.py < %s > %t/existential-bitwise-borrowability.swift // RUN: %target-swift-frontend -enable-experimental-feature RawLayout -enable-experimental-feature ValueGenerics -emit-ir -disable-availability-checking -I %S/Inputs -cxx-interoperability-mode=upcoming-swift %t/existential-bitwise-borrowability.swift | %FileCheck %t/existential-bitwise-borrowability.swift --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// REQUIRES: swift_feature_RawLayout +// REQUIRES: swift_feature_ValueGenerics + // Copyable existentials are bitwise-borrowable (because copyable types are // always bitwise-borrowable if they're bitwise-takable, and only bitwise-takable // values are stored inline in existentials). Noncopyable existentials are diff --git a/test/IRGen/existential_shape_metadata_noncopyable.swift b/test/IRGen/existential_shape_metadata_noncopyable.swift index f8aed6f4aa3..9504294e4b1 100644 --- a/test/IRGen/existential_shape_metadata_noncopyable.swift +++ b/test/IRGen/existential_shape_metadata_noncopyable.swift @@ -4,6 +4,8 @@ // RUN: -enable-experimental-feature SuppressedAssociatedTypes \ // RUN: -module-name existential_shape_metadata | %IRGenFileCheck %s +// REQUIRES: swift_feature_SuppressedAssociatedTypes + // NOTE: Once noncopyable generics are enabled by default, merge this back into existential_shape_metadata.swift // CHECK: @"$sl26existential_shape_metadata3QNC_px1ARts_XPXGMq" = linkonce_odr diff --git a/test/IRGen/extern_c.swift b/test/IRGen/extern_c.swift index a62aaa2433c..0a0ee5ee2f6 100644 --- a/test/IRGen/extern_c.swift +++ b/test/IRGen/extern_c.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -emit-ir -enable-experimental-feature Extern %s | %FileCheck %s +// REQUIRES: swift_feature_Extern + func test() { // CHECK: call void @explicit_extern_c() explicit_extern_c() diff --git a/test/IRGen/extern_c_abitypes.swift b/test/IRGen/extern_c_abitypes.swift index 1621648220f..34a9c818eb0 100644 --- a/test/IRGen/extern_c_abitypes.swift +++ b/test/IRGen/extern_c_abitypes.swift @@ -2,6 +2,8 @@ // RUN: split-file %s %t // RUN: %target-swift-frontend -emit-ir -enable-experimental-feature Extern %t/extern_c.swift -I%t | %FileCheck %s --check-prefixes CHECK,CHECK-%target-cpu +// REQUIRES: swift_feature_Extern + //--- c_abi_types.h #include diff --git a/test/IRGen/implicit_some_a.swift b/test/IRGen/implicit_some_a.swift index b82123c8d6d..f4483f1e391 100644 --- a/test/IRGen/implicit_some_a.swift +++ b/test/IRGen/implicit_some_a.swift @@ -1,7 +1,6 @@ // RUN: %target-swift-frontend -emit-ir -target %target-swift-5.1-abi-triple -primary-file %s %S/Inputs/implicit_some_b.swift -enable-experimental-feature ImplicitSome -// Because of -enable-experimental-feature ImplicitSome -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitSome protocol P {} struct S: P {} diff --git a/test/IRGen/layout_string_union_types.swift b/test/IRGen/layout_string_union_types.swift index 55045ce9601..d1df3326451 100644 --- a/test/IRGen/layout_string_union_types.swift +++ b/test/IRGen/layout_string_union_types.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature LayoutStringValueWitnesses -enable-layout-string-value-witnesses -enable-type-layout -emit-ir -import-objc-header %S/Inputs/union_type.h %s +// REQUIRES: swift_feature_LayoutStringValueWitnesses + struct UnionWrapper { let x: TestUnion } diff --git a/test/IRGen/layout_string_witnesses_block_list.swift b/test/IRGen/layout_string_witnesses_block_list.swift index ed4d50f29d6..be61fcbd368 100644 --- a/test/IRGen/layout_string_witnesses_block_list.swift +++ b/test/IRGen/layout_string_witnesses_block_list.swift @@ -10,6 +10,9 @@ // RUN: %target-swift-frontend -enable-experimental-feature LayoutStringValueWitnesses -enable-layout-string-value-witnesses -emit-ir -blocklist-file %t/blocklist.yml -module-name Foo %s 2>&1 | %FileCheck %s --check-prefix=CHECK-BLOCKED +// REQUIRES: swift_feature_LayoutStringValueWitnesses +// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation + // CHECK: type_layout_string // CHECK-BLOCKED: note: Layout string value witnesses have been disabled for module 'Foo' through block list entry diff --git a/test/IRGen/layout_string_witnesses_noncopyable.swift b/test/IRGen/layout_string_witnesses_noncopyable.swift index 8e9b30364d9..37806e9b0c8 100644 --- a/test/IRGen/layout_string_witnesses_noncopyable.swift +++ b/test/IRGen/layout_string_witnesses_noncopyable.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature LayoutStringValueWitnesses -enable-experimental-feature LayoutStringValueWitnessesInstantiation -enable-layout-string-value-witnesses -enable-layout-string-value-witnesses-instantiation -emit-ir -module-name Foo %s | %FileCheck %s +// REQUIRES: swift_feature_LayoutStringValueWitnesses +// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation + // CHECK-NOT: @"$s3Foo7GenericVWV" = {{.*}}ptr @swift_generic{{.*$}} struct Generic: ~Copyable { let x: T diff --git a/test/IRGen/layout_string_witnesses_objc_existentials.swift b/test/IRGen/layout_string_witnesses_objc_existentials.swift index 9317781686b..356934bd3df 100644 --- a/test/IRGen/layout_string_witnesses_objc_existentials.swift +++ b/test/IRGen/layout_string_witnesses_objc_existentials.swift @@ -2,6 +2,8 @@ // REQUIRES: PTRSIZE=64 // REQUIRES: objc_interop +// REQUIRES: swift_feature_LayoutStringValueWitnesses +// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation protocol P {} diff --git a/test/IRGen/linker_set_low_level.swift b/test/IRGen/linker_set_low_level.swift index 7c87ac5ac85..77bbd71fd37 100644 --- a/test/IRGen/linker_set_low_level.swift +++ b/test/IRGen/linker_set_low_level.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers %s -emit-ir -parse-as-library | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers @_used @_section("__TEXT,__mysection") diff --git a/test/IRGen/linker_set_low_level_exec.swift b/test/IRGen/linker_set_low_level_exec.swift index 943141d1cf2..ed84f6b0470 100644 --- a/test/IRGen/linker_set_low_level_exec.swift +++ b/test/IRGen/linker_set_low_level_exec.swift @@ -2,6 +2,7 @@ // REQUIRES: executable_test // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers // https://github.com/apple/swift/issues/73321 // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/mangling_inverse_generics_evolution.swift b/test/IRGen/mangling_inverse_generics_evolution.swift index c45882a3efe..1ef1ca54949 100644 --- a/test/IRGen/mangling_inverse_generics_evolution.swift +++ b/test/IRGen/mangling_inverse_generics_evolution.swift @@ -9,6 +9,9 @@ // RUN: %FileCheck %s < %t/test.irgen +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes + public protocol P: ~Copyable { } public struct CallMe { diff --git a/test/IRGen/moveonly_deinit.sil b/test/IRGen/moveonly_deinit.sil index 9c2cf082b2c..214d001f6f6 100644 --- a/test/IRGen/moveonly_deinit.sil +++ b/test/IRGen/moveonly_deinit.sil @@ -2,6 +2,8 @@ // RUN: %{python} %utils/chex.py < %s > %t/moveonly_deinit.sil // RUN: %target-swift-frontend -enable-experimental-feature MoveOnlyEnumDeinits -emit-ir %t/moveonly_deinit.sil | %FileCheck %t/moveonly_deinit.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// REQUIRES: swift_feature_MoveOnlyEnumDeinits + // UNSUPPORTED: CPU=arm64e import Builtin diff --git a/test/IRGen/moveonly_deinits.swift b/test/IRGen/moveonly_deinits.swift index df5303e2418..1302610a185 100644 --- a/test/IRGen/moveonly_deinits.swift +++ b/test/IRGen/moveonly_deinits.swift @@ -6,11 +6,11 @@ // this test is in test/SILGen/moveonly_deinits. We have a separate test so that // we can test on other platforms the other behavior. -// REQUIRES: asserts // REQUIRES: CODEGENERATOR=X86 // rdar://107495541 Test needs to be updated for 32bit. // REQUIRES: PTRSIZE=64 +// REQUIRES: swift_feature_MoveOnlyEnumDeinits ////////////////////// // Misc Declaration // diff --git a/test/IRGen/moveonly_value_functions.sil b/test/IRGen/moveonly_value_functions.sil index 7631d4867fa..2c3e4625ab6 100644 --- a/test/IRGen/moveonly_value_functions.sil +++ b/test/IRGen/moveonly_value_functions.sil @@ -6,6 +6,8 @@ // RUN: | \ // RUN: %IRGenFileCheck %s +// REQUIRES: swift_feature_RawLayout + import Builtin import Swift diff --git a/test/IRGen/noncopyable_field_descriptors.swift b/test/IRGen/noncopyable_field_descriptors.swift index 4129059fa74..a6c0e8a9ff8 100644 --- a/test/IRGen/noncopyable_field_descriptors.swift +++ b/test/IRGen/noncopyable_field_descriptors.swift @@ -18,6 +18,7 @@ // rdar://124401253 // REQUIRES: OS=macosx +// REQUIRES: swift_feature_NonescapableTypes // UNSUPPORTED: CPU=arm64e @frozen diff --git a/test/IRGen/objc_implementation.swift b/test/IRGen/objc_implementation.swift index 5f08a560a6b..844ef699cbc 100644 --- a/test/IRGen/objc_implementation.swift +++ b/test/IRGen/objc_implementation.swift @@ -5,6 +5,7 @@ // RUN: %FileCheck --input-file %t.ir %s // RUN: %FileCheck --input-file %t.ir --check-prefix NEGATIVE %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_CImplementation // CHECK-DAG: @"$sSo36ImplClassWithResilientStoredPropertyC19objc_implementationE9beforeInts5Int32VvpWvd" = hidden global i64 8, align 8 // CHECK-DAG: @"$sSo36ImplClassWithResilientStoredPropertyC19objc_implementationE6mirrors6MirrorVSgvpWvd" = hidden global i64 0, align 8 diff --git a/test/IRGen/objc_implementation_deployment_target_resilience.swift b/test/IRGen/objc_implementation_deployment_target_resilience.swift index 2a7558cb137..f3f72dc57a1 100644 --- a/test/IRGen/objc_implementation_deployment_target_resilience.swift +++ b/test/IRGen/objc_implementation_deployment_target_resilience.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -target %target-stable-abi-triple -I %S/Inputs/abi -F %clang-importer-sdk-path/frameworks %s -import-objc-header %S/Inputs/objc_implementation.h -emit-ir -o %t.ir -enable-library-evolution -verify // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -target %target-stable-abi-triple -I %S/Inputs/abi -F %clang-importer-sdk-path/frameworks %s -import-objc-header %S/Inputs/objc_implementation.h -emit-ir -o %t.ir -enable-library-evolution -enable-experimental-feature ObjCImplementationWithResilientStorage -target %target-future-triple // REQUIRES: objc_interop +// REQUIRES: swift_feature_ObjCImplementationWithResilientStorage @objc @implementation extension ImplClassWithResilientStoredProperty { @objc var beforeInt: Int32 = 0 // no-error diff --git a/test/IRGen/raw_layout.swift b/test/IRGen/raw_layout.swift index 8b671441334..bc377565bac 100644 --- a/test/IRGen/raw_layout.swift +++ b/test/IRGen/raw_layout.swift @@ -2,6 +2,9 @@ // RUN: %{python} %utils/chex.py < %s > %t/raw_layout.sil // RUN: %target-swift-frontend -enable-experimental-feature RawLayout -enable-experimental-feature ValueGenerics -emit-ir -disable-availability-checking -I %S/Inputs -cxx-interoperability-mode=upcoming-swift %t/raw_layout.sil | %FileCheck %t/raw_layout.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// REQUIRES: swift_feature_RawLayout +// REQUIRES: swift_feature_ValueGenerics + import Builtin import Swift import RawLayoutCXX diff --git a/test/IRGen/raw_layout_multifile.swift b/test/IRGen/raw_layout_multifile.swift index 779205ed101..bb0422ee500 100644 --- a/test/IRGen/raw_layout_multifile.swift +++ b/test/IRGen/raw_layout_multifile.swift @@ -2,6 +2,9 @@ // RUN: %{python} %utils/chex.py < %s > %t/raw_layout_multifile.swift // RUN: %target-swift-frontend -enable-experimental-feature BuiltinModule -enable-experimental-feature RawLayout -emit-ir -O -Xllvm -sil-disable-pass=deinit-devirtualizer -disable-availability-checking %s %S/Inputs/raw_layout_multifile_b.swift | %FileCheck %t/raw_layout_multifile.swift --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_RawLayout + @_rawLayout(like: Int32) public struct Foo: ~Copyable {} diff --git a/test/IRGen/raw_layout_old.swift b/test/IRGen/raw_layout_old.swift index 9a96c03d0fe..81544d147e3 100644 --- a/test/IRGen/raw_layout_old.swift +++ b/test/IRGen/raw_layout_old.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -target %target-cpu-apple-macosx13.0 -enable-experimental-feature RawLayout -emit-ir %s | %FileCheck %s // REQUIRES: OS=macosx +// REQUIRES: swift_feature_RawLayout // Test that when targeting older OSes diff --git a/test/IRGen/section.swift b/test/IRGen/section.swift index 8c879bf324e..e7063a088a7 100644 --- a/test/IRGen/section.swift +++ b/test/IRGen/section.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir -parse-as-library | %FileCheck %s --check-prefix=IR // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers @_section("__DATA,__mysection") var g0: Int = 1 @_section("__DATA,__mysection") var g1: (Int, Int) = (42, 43) diff --git a/test/IRGen/section_asm.swift b/test/IRGen/section_asm.swift index e933f8bb079..c440f67d64e 100644 --- a/test/IRGen/section_asm.swift +++ b/test/IRGen/section_asm.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %S/section.swift -S -parse-as-library | %FileCheck --check-prefix CHECK%target-os-binfmt-elf %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers // UNSUPPORTED: CPU=wasm32 // CHECK: .section{{.*}}__TEXT,__mysection diff --git a/test/IRGen/section_bridging_header.swift b/test/IRGen/section_bridging_header.swift index d634c1d25e6..fede2263c53 100644 --- a/test/IRGen/section_bridging_header.swift +++ b/test/IRGen/section_bridging_header.swift @@ -3,6 +3,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -enforce-exclusivity=unchecked -parse-as-library -emit-sil -import-objc-header %t/bridge.h %t/file.swift -o /dev/null // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers // BEGIN bridge.h struct MyStruct1 { diff --git a/test/IRGen/section_errors.swift b/test/IRGen/section_errors.swift index 94eef9ec476..3ddea210928 100644 --- a/test/IRGen/section_errors.swift +++ b/test/IRGen/section_errors.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -parse-as-library -emit-sil %s -o /dev/null -verify // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers @_used @_section("__TEXT,__mysection") var g0: Int = 1 // ok diff --git a/test/IRGen/section_non_const.swift b/test/IRGen/section_non_const.swift index aa722aa255e..bbc77181ef0 100644 --- a/test/IRGen/section_non_const.swift +++ b/test/IRGen/section_non_const.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -parse-as-library -emit-sil %s -o /dev/null -verify // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers @_section("__TEXT,__mysection") var g0: Int = 1 @_section("__TEXT,__mysection") var g1: (Int, Int) = (1, 2) diff --git a/test/IRGen/section_structs.swift b/test/IRGen/section_structs.swift index 1678f7dc10b..d6018d58540 100644 --- a/test/IRGen/section_structs.swift +++ b/test/IRGen/section_structs.swift @@ -4,6 +4,7 @@ // Fails without optimized stdlib (rdar://119899895) // REQUIRES: optimized_stdlib +// REQUIRES: swift_feature_SymbolLinkageMarkers // The `StaticString("hello").utf8Start` test fails on 32 bit // UNSUPPORTED: PTRSIZE=32 diff --git a/test/IRGen/section_structs_generic.swift b/test/IRGen/section_structs_generic.swift index 62b50525e65..8a80578b493 100644 --- a/test/IRGen/section_structs_generic.swift +++ b/test/IRGen/section_structs_generic.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -parse-as-library -emit-ir %s -o - | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers struct MyStruct1 { var a, b: T diff --git a/test/IRGen/section_wasm.swift b/test/IRGen/section_wasm.swift index f7f968d18fb..4638a60839d 100644 --- a/test/IRGen/section_wasm.swift +++ b/test/IRGen/section_wasm.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %S/section.swift -S -parse-as-library | %FileCheck %s --check-prefix=ASM --check-prefix ASM-%target-os // REQUIRES: CPU=wasm32 // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers // Wasm cannot have user defined section name for code sections // diff --git a/test/IRGen/sensitive.sil b/test/IRGen/sensitive.sil index 202381b235a..fe0f4a696c9 100644 --- a/test/IRGen/sensitive.sil +++ b/test/IRGen/sensitive.sil @@ -1,6 +1,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature Sensitive -emit-ir %s | %FileCheck %s // RUN: %target-swift-frontend -target %module-target-future -enable-experimental-feature Sensitive -emit-ir %s | %FileCheck %s +// REQUIRES: swift_feature_Sensitive + sil_stage canonical import Builtin diff --git a/test/IRGen/sensitive.swift b/test/IRGen/sensitive.swift index 0af9fa44cc0..47e7637e42c 100644 --- a/test/IRGen/sensitive.swift +++ b/test/IRGen/sensitive.swift @@ -16,6 +16,7 @@ // RUN: %target-run %t/a.out | %FileCheck %s // // REQUIRES: executable_test +// REQUIRES: swift_feature_Sensitive // UNSUPPORTED: use_os_stdlib var checkBuffer: UnsafeBufferPointer? diff --git a/test/IRGen/silgen_name_non_const.swift b/test/IRGen/silgen_name_non_const.swift index 9b8383dde28..b44d9e6ed38 100644 --- a/test/IRGen/silgen_name_non_const.swift +++ b/test/IRGen/silgen_name_non_const.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -parse-as-library -emit-sil %s -o /dev/null -verify // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers @_silgen_name("g0") var g0: Int = 1 @_silgen_name("g1") var g1: (Int, Int) = (1, 2) diff --git a/test/IRGen/stdlib/Mutex.swift b/test/IRGen/stdlib/Mutex.swift index 058b324da90..6d2ae8f270a 100644 --- a/test/IRGen/stdlib/Mutex.swift +++ b/test/IRGen/stdlib/Mutex.swift @@ -3,6 +3,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature RawLayout -enable-experimental-feature ValueGenerics -emit-ir -disable-availability-checking -I %S/Inputs -cxx-interoperability-mode=upcoming-swift -module-name stdlib %t/Mutex.swift | %FileCheck %t/Mutex.swift --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize // REQUIRES: synchronization +// REQUIRES: swift_feature_RawLayout +// REQUIRES: swift_feature_ValueGenerics import Synchronization diff --git a/test/IRGen/tuple_conformances.swift b/test/IRGen/tuple_conformances.swift index f747b44aaa5..9ba0fa3d013 100644 --- a/test/IRGen/tuple_conformances.swift +++ b/test/IRGen/tuple_conformances.swift @@ -1,7 +1,6 @@ // RUN: %target-swift-frontend -emit-ir -primary-file %s -enable-experimental-feature TupleConformances -parse-as-library | %FileCheck %s -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts +// REQUIRES: swift_feature_TupleConformances protocol P { func defaultRequirement() diff --git a/test/IRGen/used.swift b/test/IRGen/used.swift index 16380623c1f..769a16a8f2e 100644 --- a/test/IRGen/used.swift +++ b/test/IRGen/used.swift @@ -8,6 +8,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-ir -parse-as-library | %FileCheck %s --check-prefix=IR // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_SymbolLinkageMarkers @_used var g0: Int = 1 @_used var g1: (Int, Int) = (42, 43) diff --git a/test/Interop/Cxx/class/nonescapable-errors.swift b/test/Interop/Cxx/class/nonescapable-errors.swift index 5bfc05e2117..e15e4d02df8 100644 --- a/test/Interop/Cxx/class/nonescapable-errors.swift +++ b/test/Interop/Cxx/class/nonescapable-errors.swift @@ -2,6 +2,8 @@ // RUN: split-file %s %t // RUN: not %target-swift-frontend -typecheck -I %swift_src_root/lib/ClangImporter/SwiftBridging -I %t/Inputs %t/test.swift -enable-experimental-feature NonescapableTypes -cxx-interoperability-mode=default -diagnostic-style llvm 2>&1 | %FileCheck %s +// REQUIRES: swift_feature_NonescapableTypes + //--- Inputs/module.modulemap module Test { header "nonescapable.h" diff --git a/test/Interop/Cxx/class/nonescapable-lifetimebound.swift b/test/Interop/Cxx/class/nonescapable-lifetimebound.swift index 7d2d05c3a86..6d8fe13cfa4 100644 --- a/test/Interop/Cxx/class/nonescapable-lifetimebound.swift +++ b/test/Interop/Cxx/class/nonescapable-lifetimebound.swift @@ -2,6 +2,8 @@ // RUN: split-file %s %t // RUN: %target-swift-frontend -I %swift_src_root/lib/ClangImporter/SwiftBridging -I %t/Inputs -emit-sil %t/test.swift -enable-experimental-feature NonescapableTypes -cxx-interoperability-mode=default -diagnostic-style llvm 2>&1 | %FileCheck %s +// REQUIRES: swift_feature_NonescapableTypes + //--- Inputs/module.modulemap module Test { header "nonescapable.h" diff --git a/test/Interop/Cxx/class/safe-interop-mode.swift b/test/Interop/Cxx/class/safe-interop-mode.swift index 4e1dd75c994..ffde5d30169 100644 --- a/test/Interop/Cxx/class/safe-interop-mode.swift +++ b/test/Interop/Cxx/class/safe-interop-mode.swift @@ -4,6 +4,10 @@ // RUN: %target-swift-frontend -typecheck -verify -I %swift_src_root/lib/ClangImporter/SwiftBridging -I %t/Inputs %t/test.swift -enable-experimental-feature AllowUnsafeAttribute -enable-experimental-feature WarnUnsafe -enable-experimental-feature NonescapableTypes -enable-experimental-feature SafeInterop -cxx-interoperability-mode=default -diagnostic-style llvm 2>&1 // REQUIRES: objc_interop +// REQUIRES: swift_feature_AllowUnsafeAttribute +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SafeInterop +// REQUIRES: swift_feature_WarnUnsafe //--- Inputs/module.modulemap module Test { diff --git a/test/Interop/Cxx/library-evolution/allow-cxx-api-in-evolving-libraries.swift b/test/Interop/Cxx/library-evolution/allow-cxx-api-in-evolving-libraries.swift index 94b2a5f8234..94f686d4570 100644 --- a/test/Interop/Cxx/library-evolution/allow-cxx-api-in-evolving-libraries.swift +++ b/test/Interop/Cxx/library-evolution/allow-cxx-api-in-evolving-libraries.swift @@ -1,6 +1,8 @@ // RUN: %empty-directory(%t) // RUN: split-file %s %t // RUN: %target-swift-frontend %t/test.swift -I %t/Inputs -typecheck -enable-library-evolution -enable-experimental-cxx-interop -disable-availability-checking -disable-implicit-cxx-module-import -enable-experimental-feature AssumeResilientCxxTypes -verify + +// REQUIRES: swift_feature_AssumeResilientCxxTypes //--- Inputs/module.modulemap module CxxModule { diff --git a/test/Interop/Cxx/namespace/member-import-visibility.swift b/test/Interop/Cxx/namespace/member-import-visibility.swift index 26bf2e61e79..819a319add5 100644 --- a/test/Interop/Cxx/namespace/member-import-visibility.swift +++ b/test/Interop/Cxx/namespace/member-import-visibility.swift @@ -1,6 +1,8 @@ // RUN: %target-typecheck-verify-swift -I %S/Inputs -enable-experimental-cxx-interop // RUN: %target-typecheck-verify-swift -I %S/Inputs -enable-experimental-cxx-interop -enable-upcoming-feature MemberImportVisibility -verify-additional-prefix member-visibility- +// REQUIRES: swift_feature_MemberImportVisibility + import MembersDirect // expected-member-visibility-note@-1 4 {{add import of module 'MembersTransitive'}} diff --git a/test/Interop/Cxx/stdlib/libcxx-symbolic-module-interface.swift b/test/Interop/Cxx/stdlib/libcxx-symbolic-module-interface.swift index e817e3c5bf8..abacc46823c 100644 --- a/test/Interop/Cxx/stdlib/libcxx-symbolic-module-interface.swift +++ b/test/Interop/Cxx/stdlib/libcxx-symbolic-module-interface.swift @@ -8,8 +8,8 @@ // RUN: %target-run %t/check-libcxx-version || %FileCheck %s --check-prefixes=CHECK,STRING --input-file=%t/result.txt // RUN: %target-run %t/check-libcxx-version || %FileCheck %s --check-prefixes=CHECK,MAP --input-file=%t/result.txt -// REQUIRES: asserts // REQUIRES: OS=macosx +// REQUIRES: swift_feature_ImportSymbolicCXXDecls // CHECK: enum std { // CHECK: enum __1 { diff --git a/test/Interop/Cxx/symbolic-imports/print-symbolic-module-interface.swift b/test/Interop/Cxx/symbolic-imports/print-symbolic-module-interface.swift index a202ae62c64..99412817991 100644 --- a/test/Interop/Cxx/symbolic-imports/print-symbolic-module-interface.swift +++ b/test/Interop/Cxx/symbolic-imports/print-symbolic-module-interface.swift @@ -2,7 +2,7 @@ // RUN: split-file %s %t // RUN: %target-swift-ide-test -print-module -module-to-print=CxxModule -I %t/Inputs -source-filename=x -enable-experimental-cxx-interop -enable-experimental-feature ImportSymbolicCXXDecls | %FileCheck %s -// REQUIRES: asserts +// REQUIRES: swift_feature_ImportSymbolicCXXDecls //--- Inputs/module.modulemap module CxxModule { diff --git a/test/Interop/SwiftToCxx/core/embedded-swift.swift b/test/Interop/SwiftToCxx/core/embedded-swift.swift index 13e539eb98f..1ea2119e2dd 100644 --- a/test/Interop/SwiftToCxx/core/embedded-swift.swift +++ b/test/Interop/SwiftToCxx/core/embedded-swift.swift @@ -4,9 +4,10 @@ // REQUIRES: OS=macosx // REQUIRES: embedded_stdlib +// REQUIRES: swift_feature_Embedded public func id(_ x: Int) -> Int { return x } -// CHECK-NOT: TypeMetadataTrait \ No newline at end of file +// CHECK-NOT: TypeMetadataTrait diff --git a/test/Interop/SwiftToCxx/functions/swift-expected-execution.cpp b/test/Interop/SwiftToCxx/functions/swift-expected-execution.cpp index 55b657b607c..81b0c2de843 100644 --- a/test/Interop/SwiftToCxx/functions/swift-expected-execution.cpp +++ b/test/Interop/SwiftToCxx/functions/swift-expected-execution.cpp @@ -9,12 +9,10 @@ // RUN: %target-run %t/swift-expected-execution | %FileCheck %s // REQUIRES: executable_test +// REQUIRES: swift_feature_GenerateBindingsForThrowingFunctionsInCXX // UNSUPPORTED: OS=windows-msvc // UNSUPPORTED: CPU=arm64e -// for experimental feature GenerateBindingsForThrowingFunctionsInCXX: -// REQUIRES: asserts - #include #include #include "functions.h" diff --git a/test/Interop/SwiftToCxx/functions/swift-functions-errors-execution.cpp b/test/Interop/SwiftToCxx/functions/swift-functions-errors-execution.cpp index ecfb17061eb..591df5e1f23 100644 --- a/test/Interop/SwiftToCxx/functions/swift-functions-errors-execution.cpp +++ b/test/Interop/SwiftToCxx/functions/swift-functions-errors-execution.cpp @@ -9,14 +9,12 @@ // RUN: %target-run %t/swift-functions-errors-execution | %FileCheck %s // REQUIRES: executable_test +// REQUIRES: swift_feature_GenerateBindingsForThrowingFunctionsInCXX // UNSUPPORTED: OS=windows-msvc // rdar://102167469 // UNSUPPORTED: CPU=arm64e -// for experimental feature GenerateBindingsForThrowingFunctionsInCXX: -// REQUIRES: asserts - #include #include #include "functions.h" diff --git a/test/Interop/SwiftToCxx/functions/swift-functions-errors.swift b/test/Interop/SwiftToCxx/functions/swift-functions-errors.swift index e8f8b30c528..520e25e5a8a 100644 --- a/test/Interop/SwiftToCxx/functions/swift-functions-errors.swift +++ b/test/Interop/SwiftToCxx/functions/swift-functions-errors.swift @@ -4,8 +4,7 @@ // RUN: %check-interop-cxx-header-in-clang(%t/functions.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -DSWIFT_CXX_INTEROP_EXPERIMENTAL_SWIFT_ERROR -Wno-unused-function) -// for experimental feature GenerateBindingsForThrowingFunctionsInCXX: -// REQUIRES: asserts +// REQUIRES: swift_feature_GenerateBindingsForThrowingFunctionsInCXX // CHECK-LABEL: namespace Functions SWIFT_PRIVATE_ATTR SWIFT_SYMBOL_MODULE("Functions") { diff --git a/test/Interop/WebAssembly/extern-wasm-cdecls.swift b/test/Interop/WebAssembly/extern-wasm-cdecls.swift index 0d3140c5c0c..881a648f791 100644 --- a/test/Interop/WebAssembly/extern-wasm-cdecls.swift +++ b/test/Interop/WebAssembly/extern-wasm-cdecls.swift @@ -1,6 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -emit-ir -enable-experimental-feature Extern -module-name Extern | %FileCheck %s +// REQUIRES: swift_feature_Extern + // CHECK: declare void @import1() [[EA1:#[0-9]+]] @_extern(c) @_extern(wasm, module: "m0", name: "import1") diff --git a/test/Interop/WebAssembly/extern-wasm-decls-to-swift.swift b/test/Interop/WebAssembly/extern-wasm-decls-to-swift.swift index 5c490c4e1f9..9785898cebd 100644 --- a/test/Interop/WebAssembly/extern-wasm-decls-to-swift.swift +++ b/test/Interop/WebAssembly/extern-wasm-decls-to-swift.swift @@ -1,6 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -enable-experimental-feature Extern -emit-ir -module-name Extern | %FileCheck %s +// REQUIRES: swift_feature_Extern + // CHECK: declare {{.*}} void @"$s6Extern7import1yyF"() [[EA1:#[0-9]+]] @_extern(wasm, module: "m0", name: "import1") func import1() diff --git a/test/Interpreter/dynamic_isolation_checks_for_closures.swift b/test/Interpreter/dynamic_isolation_checks_for_closures.swift index 318b1f6db0d..f5da3759111 100644 --- a/test/Interpreter/dynamic_isolation_checks_for_closures.swift +++ b/test/Interpreter/dynamic_isolation_checks_for_closures.swift @@ -23,11 +23,11 @@ // RUN: not --crash env SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=legacy SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL=2 %target-run %t/crash3.out 2>&1 | %FileCheck %t/src/Crash3.swift --check-prefix=LEGACY_CHECK // RUN: not --crash env SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=swift6 SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL=2 %target-run %t/crash3.out 2>&1 | %FileCheck %t/src/Crash3.swift --check-prefix=SWIFT6_CHECK --dump-input=always -// REQUIRES: asserts // REQUIRES: concurrency // REQUIRES: concurrency_runtime // REQUIRES: executable_test // REQUIRES: OS=macosx +// REQUIRES: swift_feature_DynamicActorIsolation // rdar://123810657 // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/escapable_generics_casting.swift b/test/Interpreter/escapable_generics_casting.swift index 2826469986c..4d8182c4400 100644 --- a/test/Interpreter/escapable_generics_casting.swift +++ b/test/Interpreter/escapable_generics_casting.swift @@ -7,6 +7,7 @@ // UNSUPPORTED: back_deployment_runtime // REQUIRES: rdar125805695 +// REQUIRES: swift_feature_NonescapableTypes protocol P { func speak() diff --git a/test/Interpreter/keypath.swift b/test/Interpreter/keypath.swift index 427d9162ccb..f96a0f7d5ef 100644 --- a/test/Interpreter/keypath.swift +++ b/test/Interpreter/keypath.swift @@ -1,7 +1,7 @@ // RUN: %target-run-simple-swift | %FileCheck %s -// REQUIRES: asserts // REQUIRES: executable_test +// REQUIRES: swift_feature_KeyPathWithStaticMembers // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/layout_string_witnesses_dynamic.swift b/test/Interpreter/layout_string_witnesses_dynamic.swift index 807f8587b17..d11fb86e22f 100644 --- a/test/Interpreter/layout_string_witnesses_dynamic.swift +++ b/test/Interpreter/layout_string_witnesses_dynamic.swift @@ -9,6 +9,8 @@ // RUN: %target-run %t/main %t/%target-library-name(layout_string_witnesses_types) | %FileCheck %s --check-prefix=CHECK -check-prefix=CHECK-%target-os // REQUIRES: executable_test +// REQUIRES: swift_feature_LayoutStringValueWitnesses +// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation // Requires runtime functions added in Swift 5.9. // UNSUPPORTED: use_os_stdlib diff --git a/test/Interpreter/layout_string_witnesses_objc.swift b/test/Interpreter/layout_string_witnesses_objc.swift index fd44028bbad..39ab57e209c 100644 --- a/test/Interpreter/layout_string_witnesses_objc.swift +++ b/test/Interpreter/layout_string_witnesses_objc.swift @@ -10,6 +10,8 @@ // REQUIRES: executable_test // REQUIRES: objc_interop +// REQUIRES: swift_feature_LayoutStringValueWitnesses +// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation // Requires runtime functions added in Swift 5.9. // UNSUPPORTED: use_os_stdlib diff --git a/test/Interpreter/layout_string_witnesses_static.swift b/test/Interpreter/layout_string_witnesses_static.swift index c93425df853..16b606bc4eb 100644 --- a/test/Interpreter/layout_string_witnesses_static.swift +++ b/test/Interpreter/layout_string_witnesses_static.swift @@ -11,6 +11,7 @@ // RUN: %target-run %t/main %t/%target-library-name(layout_string_witnesses_types) | %FileCheck %s --check-prefix=CHECK -check-prefix=CHECK-%target-os // REQUIRES: executable_test +// REQUIRES: swift_feature_LayoutStringValueWitnesses // Requires runtime functions added in Swift 5.9. // UNSUPPORTED: use_os_stdlib diff --git a/test/Interpreter/lazy/deferred_syntax_errors.swift b/test/Interpreter/lazy/deferred_syntax_errors.swift index c9acad0f713..98bbe57254c 100644 --- a/test/Interpreter/lazy/deferred_syntax_errors.swift +++ b/test/Interpreter/lazy/deferred_syntax_errors.swift @@ -2,9 +2,8 @@ // REQUIRES: swift_interpreter // RUN: %target-jit-run %s -enable-experimental-feature LazyImmediate | %FileCheck %s -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts // REQUIRES: rdar118189728 +// REQUIRES: swift_feature_LazyImmediate // Tests that parsing of function bodies is deferred // to runtime when the interpreter is invoked using diff --git a/test/Interpreter/lazy/deferred_type_errors.swift b/test/Interpreter/lazy/deferred_type_errors.swift index 71697f263f6..d4bf58ed172 100644 --- a/test/Interpreter/lazy/deferred_type_errors.swift +++ b/test/Interpreter/lazy/deferred_type_errors.swift @@ -1,10 +1,8 @@ // REQUIRES: OS=macosx // REQUIRES: swift_interpreter +// REQUIRES: swift_feature_LazyImmediate // RUN: %target-jit-run %s -enable-experimental-feature LazyImmediate | %FileCheck %s -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts - // Tests that type checking of function bodies is // deferred to runtime when the interpreter is invoked // using experimental lazy compilation. Type errors in diff --git a/test/Interpreter/lazy/globals.swift b/test/Interpreter/lazy/globals.swift index 8d1f7663cc6..3dc8d713403 100644 --- a/test/Interpreter/lazy/globals.swift +++ b/test/Interpreter/lazy/globals.swift @@ -1,10 +1,8 @@ // REQUIRES: OS=macosx // REQUIRES: swift_interpreter +// REQUIRES: swift_feature_LazyImmediate // RUN: %target-jit-run %s -enable-experimental-feature LazyImmediate | %FileCheck %s -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts - // Tests that piecewise compilation works with global variables let x = 1 diff --git a/test/Interpreter/lazy/linkage_promotion.swift b/test/Interpreter/lazy/linkage_promotion.swift index 1dbfcc41346..69665509aaf 100644 --- a/test/Interpreter/lazy/linkage_promotion.swift +++ b/test/Interpreter/lazy/linkage_promotion.swift @@ -1,10 +1,8 @@ // REQUIRES: OS=macosx // REQUIRES: swift_interpreter +// REQUIRES: swift_feature_LazyImmediate // RUN: %target-jit-run %s -enable-experimental-feature LazyImmediate | %FileCheck %s -// -enable-experimental-feature requires an asserts build -// REQUIRES: asserts - // Tests that the linkage of private symbols is // promoted to hidden external, allowing // single-function compilation of non-public symbols. diff --git a/test/Interpreter/moveonly_discard.swift b/test/Interpreter/moveonly_discard.swift index d0c530c2ed8..0c2bc4e06ea 100644 --- a/test/Interpreter/moveonly_discard.swift +++ b/test/Interpreter/moveonly_discard.swift @@ -2,6 +2,7 @@ // RUN: %target-run-simple-swift(-O -Xfrontend -enable-experimental-feature -Xfrontend MoveOnlyEnumDeinits -Xfrontend -sil-verify-all) | %FileCheck %s --implicit-check-not closing // REQUIRES: executable_test +// REQUIRES: swift_feature_MoveOnlyEnumDeinits // NOTE: it's important that this test has the `--implicit-check-not closing` flag to catch double deinits!! // you also want to make sure all messages start with "closing" diff --git a/test/Interpreter/moveonly_generics_associatedtype.swift b/test/Interpreter/moveonly_generics_associatedtype.swift index 4dfd34e7d97..7ab1cf1f055 100644 --- a/test/Interpreter/moveonly_generics_associatedtype.swift +++ b/test/Interpreter/moveonly_generics_associatedtype.swift @@ -3,7 +3,7 @@ // RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-experimental-feature SuppressedAssociatedTypes) | %FileCheck %s // REQUIRES: executable_test -// REQUIRES: asserts +// REQUIRES: swift_feature_SuppressedAssociatedTypes class Backend { diff --git a/test/Interpreter/moveonly_generics_casting_assoctypes.swift b/test/Interpreter/moveonly_generics_casting_assoctypes.swift index 9be076723e7..6a0fd31f564 100644 --- a/test/Interpreter/moveonly_generics_casting_assoctypes.swift +++ b/test/Interpreter/moveonly_generics_casting_assoctypes.swift @@ -2,6 +2,7 @@ // RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-experimental-feature SuppressedAssociatedTypes) // REQUIRES: executable_test +// REQUIRES: swift_feature_SuppressedAssociatedTypes // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/moveonly_swiftskell.swift b/test/Interpreter/moveonly_swiftskell.swift index 458a4448050..9af0bdadd19 100644 --- a/test/Interpreter/moveonly_swiftskell.swift +++ b/test/Interpreter/moveonly_swiftskell.swift @@ -23,6 +23,8 @@ // RUN: %target-run %t/Opt %t/%target-library-name(Swiftskell) | %FileCheck %s --implicit-check-not destroy // REQUIRES: executable_test +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes // Temporarily disable for back-deployment (rdar://128544927) // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/objc_implementation.swift b/test/Interpreter/objc_implementation.swift index 396a9f59a81..33231966610 100644 --- a/test/Interpreter/objc_implementation.swift +++ b/test/Interpreter/objc_implementation.swift @@ -1,6 +1,7 @@ // RUN: %target-run-simple-swift(-import-objc-header %S/Inputs/objc_implementation.h -D TOP_LEVEL_CODE -swift-version 5 -enable-experimental-feature CImplementation -target %target-stable-abi-triple) %s | %FileCheck %s // REQUIRES: executable_test // REQUIRES: objc_interop +// REQUIRES: swift_feature_CImplementation import Foundation diff --git a/test/Interpreter/objc_implementation_objc_client.m b/test/Interpreter/objc_implementation_objc_client.m index 12e0c65f519..13d7ae47877 100644 --- a/test/Interpreter/objc_implementation_objc_client.m +++ b/test/Interpreter/objc_implementation_objc_client.m @@ -22,6 +22,7 @@ // FIXME: This test fails in Swift CI simulators, but I have not been able to // reproduce this locally. // REQUIRES: OS=macosx +// REQUIRES: swift_feature_CImplementation #import #import diff --git a/test/Interpreter/objc_implementation_resilience.swift b/test/Interpreter/objc_implementation_resilience.swift index a46f8b20b31..0f9854d92d1 100644 --- a/test/Interpreter/objc_implementation_resilience.swift +++ b/test/Interpreter/objc_implementation_resilience.swift @@ -5,6 +5,8 @@ // RUN: %target-run-simple-swift(-import-objc-header %S/Inputs/objc_implementation.h -D RESILIENCE -swift-version 5 -enable-experimental-feature CImplementation -enable-experimental-feature ObjCImplementationWithResilientStorage -target %target-future-triple %S/objc_implementation.swift) | %FileCheck %S/objc_implementation.swift --check-prefixes CHECK,CHECK-RESILIENCE // REQUIRES: executable_test // REQUIRES: objc_interop +// REQUIRES: swift_feature_CImplementation +// REQUIRES: swift_feature_ObjCImplementationWithResilientStorage @main struct Main { static func main() { diff --git a/test/Interpreter/objc_implementation_resilience_objc_client.m b/test/Interpreter/objc_implementation_resilience_objc_client.m index 5242c306eaa..6f55ba8bc44 100644 --- a/test/Interpreter/objc_implementation_resilience_objc_client.m +++ b/test/Interpreter/objc_implementation_resilience_objc_client.m @@ -27,3 +27,5 @@ // FIXME: This test fails in Swift CI simulators, but I have not been able to // reproduce this locally. // REQUIRES: OS=macosx +// REQUIRES: swift_feature_CImplementation +// REQUIRES: swift_feature_ObjCImplementationWithResilientStorage diff --git a/test/Interpreter/objc_implementation_resilience_swift_client.swift b/test/Interpreter/objc_implementation_resilience_swift_client.swift index b23d52fc01c..a22c6b13350 100644 --- a/test/Interpreter/objc_implementation_resilience_swift_client.swift +++ b/test/Interpreter/objc_implementation_resilience_swift_client.swift @@ -37,6 +37,8 @@ // REQUIRES: executable_test // REQUIRES: objc_interop +// REQUIRES: swift_feature_CImplementation +// REQUIRES: swift_feature_ObjCImplementationWithResilientStorage @main struct Main { static func main() { diff --git a/test/Interpreter/objc_implementation_swift_client.swift b/test/Interpreter/objc_implementation_swift_client.swift index 92a0f4379e7..9ac0fcafce5 100644 --- a/test/Interpreter/objc_implementation_swift_client.swift +++ b/test/Interpreter/objc_implementation_swift_client.swift @@ -33,6 +33,7 @@ // REQUIRES: executable_test // REQUIRES: objc_interop +// REQUIRES: swift_feature_CImplementation import Foundation import objc_implementation diff --git a/test/Interpreter/preconcurrency_conformances.swift b/test/Interpreter/preconcurrency_conformances.swift index 774504ed43f..4835a2026df 100644 --- a/test/Interpreter/preconcurrency_conformances.swift +++ b/test/Interpreter/preconcurrency_conformances.swift @@ -44,11 +44,11 @@ // RUN: not --crash env SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=legacy SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL=2 %target-run %t/crash6.out 2>&1 | %FileCheck %t/src/Crash6.swift --check-prefix=LEGACY_CHECK // RUN: not --crash env SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=swift6 SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL=2 %target-run %t/crash6.out 2>&1 | %FileCheck %t/src/Crash6.swift --check-prefix=SWIFT6_CHECK --dump-input=always -// REQUIRES: asserts // REQUIRES: concurrency // REQUIRES: concurrency_runtime // REQUIRES: executable_test // REQUIRES: OS=macosx +// REQUIRES: swift_feature_DynamicActorIsolation // rdar://123810657 // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/preconcurrency_conformances_with_disabled_checks.swift b/test/Interpreter/preconcurrency_conformances_with_disabled_checks.swift index eb70d7cae42..c9e51adbdf5 100644 --- a/test/Interpreter/preconcurrency_conformances_with_disabled_checks.swift +++ b/test/Interpreter/preconcurrency_conformances_with_disabled_checks.swift @@ -51,11 +51,11 @@ // RUN: env SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=legacy SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL=2 %target-run %t/test6.out 2>&1 | %FileCheck %t/src/Test6.swift // RUN: env SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=swift6 SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL=2 %target-run %t/test6.out 2>&1 | %FileCheck %t/src/Test6.swift -// REQUIRES: asserts // REQUIRES: concurrency // REQUIRES: concurrency_runtime // REQUIRES: executable_test // REQUIRES: OS=macosx +// REQUIRES: swift_feature_DynamicActorIsolation // rdar://123810657 // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/preconcurrency_conformances_with_legacy_isSameExecutor.swift b/test/Interpreter/preconcurrency_conformances_with_legacy_isSameExecutor.swift index 927ccc79a26..840d44ca490 100644 --- a/test/Interpreter/preconcurrency_conformances_with_legacy_isSameExecutor.swift +++ b/test/Interpreter/preconcurrency_conformances_with_legacy_isSameExecutor.swift @@ -31,11 +31,11 @@ // RUN: %target-codesign %t/test4.out // RUN: env SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=legacy %target-run %t/test4.out 2>&1 | %FileCheck %t/src/Test4.swift -// REQUIRES: asserts // REQUIRES: concurrency // REQUIRES: concurrency_runtime // REQUIRES: executable_test // REQUIRES: OS=macosx +// REQUIRES: swift_feature_DynamicActorIsolation // rdar://123810657 // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/raw_layout.swift b/test/Interpreter/raw_layout.swift index 7f47cca9bb3..d0cbbbbb4fe 100644 --- a/test/Interpreter/raw_layout.swift +++ b/test/Interpreter/raw_layout.swift @@ -1,5 +1,6 @@ // RUN: %target-run-simple-swift(-enable-experimental-feature RawLayout) | %FileCheck %s // REQUIRES: executable_test +// REQUIRES: swift_feature_RawLayout @_rawLayout(like: T) struct Cell: ~Copyable {} diff --git a/test/Interpreter/raw_layout_deinit.swift b/test/Interpreter/raw_layout_deinit.swift index a703915ed4a..b1e5ecce041 100644 --- a/test/Interpreter/raw_layout_deinit.swift +++ b/test/Interpreter/raw_layout_deinit.swift @@ -3,6 +3,7 @@ // RUN: %target-codesign %t/a.out // RUN: %target-run %t/a.out | %FileCheck %s // REQUIRES: executable_test +// REQUIRES: swift_feature_RawLayout @_rawLayout(size: 16, alignment: 16) struct Foo: ~Copyable { diff --git a/test/Interpreter/refcount_overflow.swift b/test/Interpreter/refcount_overflow.swift index 88e6c98281e..8640c1c729c 100644 --- a/test/Interpreter/refcount_overflow.swift +++ b/test/Interpreter/refcount_overflow.swift @@ -6,6 +6,7 @@ // RUN: %target-run %t/refcount_overflow // REQUIRES: executable_test +// REQUIRES: swift_feature_Extern // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/reference_bindings.swift b/test/Interpreter/reference_bindings.swift index e0c328596a6..170bf220d4e 100644 --- a/test/Interpreter/reference_bindings.swift +++ b/test/Interpreter/reference_bindings.swift @@ -1,6 +1,7 @@ // RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-experimental-feature ReferenceBindings) // REQUIRES: executable_test +// REQUIRES: swift_feature_ReferenceBindings import StdlibUnittest diff --git a/test/Interpreter/static_keypaths.swift b/test/Interpreter/static_keypaths.swift index 9956eb82fb9..1b400315bbf 100644 --- a/test/Interpreter/static_keypaths.swift +++ b/test/Interpreter/static_keypaths.swift @@ -20,7 +20,7 @@ // REQUIRES: executable_test // REQUIRES: OS=macosx -// REQUIRES: asserts +// REQUIRES: swift_feature_KeyPathWithStaticMembers // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/Interpreter/value_generics.swift b/test/Interpreter/value_generics.swift index 94149f4b1e5..2dbace085a6 100644 --- a/test/Interpreter/value_generics.swift +++ b/test/Interpreter/value_generics.swift @@ -4,6 +4,7 @@ // UNSUPPORTED: back_deployment_runtime // REQUIRES: executable_test +// REQUIRES: swift_feature_ValueGenerics struct A {} diff --git a/test/Macros/DebugDescription/dollar_handling.swift b/test/Macros/DebugDescription/dollar_handling.swift index 22b1a95fd28..c13cb710e8b 100644 --- a/test/Macros/DebugDescription/dollar_handling.swift +++ b/test/Macros/DebugDescription/dollar_handling.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/DebugDescription/explicit_self_property.swift b/test/Macros/DebugDescription/explicit_self_property.swift index f6915418207..a337203a1c0 100644 --- a/test/Macros/DebugDescription/explicit_self_property.swift +++ b/test/Macros/DebugDescription/explicit_self_property.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/DebugDescription/extension.swift b/test/Macros/DebugDescription/extension.swift index 163d25ef6dd..e6a9a4f2dd4 100644 --- a/test/Macros/DebugDescription/extension.swift +++ b/test/Macros/DebugDescription/extension.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/DebugDescription/implicit_self_property.swift b/test/Macros/DebugDescription/implicit_self_property.swift index 7f04968bfce..a40884977d5 100644 --- a/test/Macros/DebugDescription/implicit_self_property.swift +++ b/test/Macros/DebugDescription/implicit_self_property.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/DebugDescription/linkage.swift b/test/Macros/DebugDescription/linkage.swift index e0008ea47b6..27f3c6951c3 100644 --- a/test/Macros/DebugDescription/linkage.swift +++ b/test/Macros/DebugDescription/linkage.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/DebugDescription/long_string.swift b/test/Macros/DebugDescription/long_string.swift index e54fbc6c3a0..8cb008f189a 100644 --- a/test/Macros/DebugDescription/long_string.swift +++ b/test/Macros/DebugDescription/long_string.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/DebugDescription/property_chain.swift b/test/Macros/DebugDescription/property_chain.swift index d71fb86662b..6919ead8f0c 100644 --- a/test/Macros/DebugDescription/property_chain.swift +++ b/test/Macros/DebugDescription/property_chain.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/DebugDescription/static_string.swift b/test/Macros/DebugDescription/static_string.swift index a0840bdfc9c..75e22cafac3 100644 --- a/test/Macros/DebugDescription/static_string.swift +++ b/test/Macros/DebugDescription/static_string.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/DebugDescription/supported_description.swift b/test/Macros/DebugDescription/supported_description.swift index 5fff0d07a08..d1f4c3e9df3 100644 --- a/test/Macros/DebugDescription/supported_description.swift +++ b/test/Macros/DebugDescription/supported_description.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_DebugDescriptionMacro // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -enable-experimental-feature DebugDescriptionMacro -plugin-path %swift-plugin-dir -dump-macro-expansions > %t/expansions-dump.txt 2>&1 diff --git a/test/Macros/expand_on_imported.swift b/test/Macros/expand_on_imported.swift index 1e23368e051..c7efe0ed9e3 100644 --- a/test/Macros/expand_on_imported.swift +++ b/test/Macros/expand_on_imported.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser, executable_test, concurrency +// REQUIRES: swift_feature_MacrosOnImports // RUN: %empty-directory(%t) // RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath -swift-version 5 diff --git a/test/Macros/expand_on_imported_objc.swift b/test/Macros/expand_on_imported_objc.swift index 7b941744cd2..b0d22c6354f 100644 --- a/test/Macros/expand_on_imported_objc.swift +++ b/test/Macros/expand_on_imported_objc.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser, executable_test, objc_interop, concurrency +// REQUIRES: swift_feature_MacrosOnImports // RUN: %empty-directory(%t) // RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath -swift-version 5 diff --git a/test/Macros/macro_attribute_expansiondecl.swift b/test/Macros/macro_attribute_expansiondecl.swift index c26d8ac3547..0c7ebe34a99 100644 --- a/test/Macros/macro_attribute_expansiondecl.swift +++ b/test/Macros/macro_attribute_expansiondecl.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser, OS=macosx +// REQUIRES: swift_feature_FreestandingMacros // RUN: %empty-directory(%t) // RUN: mkdir -p %t/src diff --git a/test/Macros/macro_expand_body.swift b/test/Macros/macro_expand_body.swift index a0a7f5373f9..ebd86736c36 100644 --- a/test/Macros/macro_expand_body.swift +++ b/test/Macros/macro_expand_body.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser, executable_test, asserts, concurrency +// REQUIRES: swift_feature_PreambleMacros // RUN: %empty-directory(%t) // RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath -swift-version 5 diff --git a/test/Macros/macro_expand_codeitems.swift b/test/Macros/macro_expand_codeitems.swift index 4cb673e6ba7..c94e4e87564 100644 --- a/test/Macros/macro_expand_codeitems.swift +++ b/test/Macros/macro_expand_codeitems.swift @@ -1,4 +1,5 @@ -// REQUIRES: swift_swift_parser, executable_test, asserts +// REQUIRES: swift_swift_parser, executable_test +// REQUIRES: swift_feature_CodeItemMacros // RUN: %empty-directory(%t) // RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath -swift-version 5 @@ -21,7 +22,7 @@ func testFreestandingMacroExpansion() { // CHECK: from stmt // CHECK: from usedInExpandedStmt // CHECK: from expr - // CHECK-DIAGS: struct $s9MacroUser0033macro_expand_codeitemsswift_DbGHjfMX25_2_9codeItemsfMf_3foofMu_ { + // CHECK-DIAGS: struct $s9MacroUser0033macro_expand_codeitemsswift_DbGHjfMX26_2_9codeItemsfMf_3foofMu_ { // CHECK-DIAGS: END CONTENTS OF FILE #codeItems diff --git a/test/Macros/macro_plugin_broken.swift b/test/Macros/macro_plugin_broken.swift index 0ab2e39df18..1f09e0f9dca 100644 --- a/test/Macros/macro_plugin_broken.swift +++ b/test/Macros/macro_plugin_broken.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_Macros // RUN: %empty-directory(%t) // RUN: split-file %s %t diff --git a/test/Macros/macro_plugin_error.swift b/test/Macros/macro_plugin_error.swift index 52746e7ec70..a4d6bd3865d 100644 --- a/test/Macros/macro_plugin_error.swift +++ b/test/Macros/macro_plugin_error.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_Macros // RUN: %empty-directory(%t) // RUN: split-file %s %t diff --git a/test/Macros/macro_plugin_server.swift b/test/Macros/macro_plugin_server.swift index 0a51ff3e758..bee94d24d20 100644 --- a/test/Macros/macro_plugin_server.swift +++ b/test/Macros/macro_plugin_server.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_Macros // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/plugins) diff --git a/test/Macros/macro_vfs.swift b/test/Macros/macro_vfs.swift index 271b6b5522f..4b0317ff63f 100644 --- a/test/Macros/macro_vfs.swift +++ b/test/Macros/macro_vfs.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_Macros // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/hidden) diff --git a/test/Macros/macros_diagnostics.swift b/test/Macros/macros_diagnostics.swift index 6f207bf6623..84e3feed2d9 100644 --- a/test/Macros/macros_diagnostics.swift +++ b/test/Macros/macros_diagnostics.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser, asserts +// REQUIRES: swift_feature_CodeItemMacros // RUN: %target-typecheck-verify-swift -swift-version 5 -enable-experimental-feature CodeItemMacros -module-name MacrosTest diff --git a/test/Macros/print_clang_expand_on_imported.swift b/test/Macros/print_clang_expand_on_imported.swift index 50151c25e38..c69c1f9e1f2 100644 --- a/test/Macros/print_clang_expand_on_imported.swift +++ b/test/Macros/print_clang_expand_on_imported.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser, executable_test, concurrency +// REQUIRES: swift_feature_MacrosOnImports // RUN: %empty-directory(%t) // RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath -swift-version 5 diff --git a/test/Macros/print_clang_expand_on_imported_objc.swift b/test/Macros/print_clang_expand_on_imported_objc.swift index 39018310379..da64be37f8b 100644 --- a/test/Macros/print_clang_expand_on_imported_objc.swift +++ b/test/Macros/print_clang_expand_on_imported_objc.swift @@ -1,4 +1,5 @@ // REQUIRES: swift_swift_parser, executable_test, objc_interop, concurrency +// REQUIRES: swift_feature_MacrosOnImports // RUN: %empty-directory(%t) // RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath -swift-version 5 diff --git a/test/Macros/serialize_plugin_search_paths.swift b/test/Macros/serialize_plugin_search_paths.swift index 9295e124f8e..529a61eccb9 100644 --- a/test/Macros/serialize_plugin_search_paths.swift +++ b/test/Macros/serialize_plugin_search_paths.swift @@ -11,6 +11,8 @@ // RUN: -load-plugin-executable %t/mock-plugin#TestPlugin // RUN: %lldb-moduleimport-test -verbose -dump-module %t/a.out | %FileCheck %s + +// REQUIRES: swift_feature_Macros // CHECK: - Plugin Search Options: // CHECK: -plugin-path {{.*}}plugins // CHECK: -external-plugin-path {{.*}}plugins#{{.*}}swift-plugin-server diff --git a/test/ModuleInterface/access-level-import-swiftinterfaces.swift b/test/ModuleInterface/access-level-import-swiftinterfaces.swift index 2f8212abad9..af10dd3aa13 100644 --- a/test/ModuleInterface/access-level-import-swiftinterfaces.swift +++ b/test/ModuleInterface/access-level-import-swiftinterfaces.swift @@ -105,6 +105,8 @@ // RUN: %FileCheck --check-prefixes=CHECK-7-MUL-PRV %s < %t/MultiFiles_Swift6.private.swiftinterface // RUN: %FileCheck --check-prefixes=CHECK-7-MUL-PKG %s < %t/MultiFiles_Swift6.package.swiftinterface +// REQUIRES: swift_feature_InternalImportsByDefault + //--- PublicLib.swift //--- PackageLib.swift //--- InternalLib.swift diff --git a/test/ModuleInterface/coroutine_accessors.swift b/test/ModuleInterface/coroutine_accessors.swift index f691d1e8b04..9b6cc2c35fd 100644 --- a/test/ModuleInterface/coroutine_accessors.swift +++ b/test/ModuleInterface/coroutine_accessors.swift @@ -6,7 +6,7 @@ // RUN: %FileCheck %s < %t.swiftinterface // RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name Rock -// REQUIRES: asserts +// REQUIRES: swift_feature_CoroutineAccessors var _i: Int = 0 diff --git a/test/ModuleInterface/extern_attr.swift b/test/ModuleInterface/extern_attr.swift index 445bd3783d4..a447f14aba7 100644 --- a/test/ModuleInterface/extern_attr.swift +++ b/test/ModuleInterface/extern_attr.swift @@ -4,6 +4,8 @@ // RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -module-name Library // RUN: %FileCheck %s < %t/Library.swiftinterface +// REQUIRES: swift_feature_Extern + // CHECK: @_extern(c) public func externalCFunc() @_extern(c) public func externalCFunc() diff --git a/test/ModuleInterface/imports-swift7.swift b/test/ModuleInterface/imports-swift7.swift index 6a1ba3b5599..3b10ede8623 100644 --- a/test/ModuleInterface/imports-swift7.swift +++ b/test/ModuleInterface/imports-swift7.swift @@ -13,6 +13,8 @@ // RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -I %S/Inputs/imports-clang-modules/ -I %t // RUN: %FileCheck -implicit-check-not BAD -check-prefix CHECK-7 %s < %t.swiftinterface +// REQUIRES: swift_feature_InternalImportsByDefault + //--- empty.swift //--- main.swift diff --git a/test/ModuleInterface/isolated-deinit-compatibility.swift b/test/ModuleInterface/isolated-deinit-compatibility.swift index 8427f17719a..b4afd916731 100644 --- a/test/ModuleInterface/isolated-deinit-compatibility.swift +++ b/test/ModuleInterface/isolated-deinit-compatibility.swift @@ -3,6 +3,8 @@ // RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -enable-experimental-feature IsolatedDeinit -target %target-swift-5.5-abi-triple -module-name IsolatedDeinitCompatibility // RUN: %FileCheck %s < %t.swiftinterface +// REQUIRES: swift_feature_IsolatedDeinit + // MARK: Sync deinit in class // CHECK-NOT: # diff --git a/test/ModuleInterface/layout_pre_specialization.swift b/test/ModuleInterface/layout_pre_specialization.swift index 91540d9dc6a..9948b28ea39 100644 --- a/test/ModuleInterface/layout_pre_specialization.swift +++ b/test/ModuleInterface/layout_pre_specialization.swift @@ -5,6 +5,8 @@ // RUN: %target-swift-typecheck-module-from-interface(%t/LayoutPrespec.swiftinterface) -module-name LayoutPrespec -enable-experimental-feature LayoutPrespecialization -disable-availability-checking // RUN: %FileCheck %s < %t/LayoutPrespec.swiftinterface +// REQUIRES: swift_feature_LayoutPrespecialization + // CHECK: @_specialize(exported: true, kind: full, where @_noMetadata A : _Class) // CHECK-NEXT: public func test(a: A) -> A @_specialize(exported: true, where @_noMetadata A : _Class) diff --git a/test/ModuleInterface/lifetime_dependence_test.swift b/test/ModuleInterface/lifetime_dependence_test.swift index b8ea176cacc..0a146c5faf4 100644 --- a/test/ModuleInterface/lifetime_dependence_test.swift +++ b/test/ModuleInterface/lifetime_dependence_test.swift @@ -8,7 +8,6 @@ // RUN: -emit-module-interface-path %t/lifetime_dependence.swiftinterface \ // RUN: -disable-experimental-parser-round-trip \ // RUN: %S/Inputs/lifetime_dependence.swift -// REQUIRES: asserts // Check the interfaces @@ -25,6 +24,8 @@ // RUN: -disable-experimental-parser-round-trip \ // RUN: -enable-experimental-feature NonescapableTypes +// REQUIRES: swift_feature_NonescapableTypes + import lifetime_dependence // CHECK: @lifetime(borrow a) // CHECK-NEXT: @inlinable internal init(_ ptr: Swift.UnsafeRawBufferPointer, _ a: borrowing Swift.Array) { diff --git a/test/ModuleInterface/noncopyable_generics.swift b/test/ModuleInterface/noncopyable_generics.swift index 7fc03a4668a..0b1953961a4 100644 --- a/test/ModuleInterface/noncopyable_generics.swift +++ b/test/ModuleInterface/noncopyable_generics.swift @@ -43,6 +43,10 @@ // RUN: %FileCheck %s --check-prefix=CHECK-SILGEN < %t/final.silgen +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SE427NoInferenceOnExtension +// REQUIRES: swift_feature_SuppressedAssociatedTypes + import NoncopyableGenerics_Misc diff --git a/test/ModuleInterface/nonescapable_types.swift b/test/ModuleInterface/nonescapable_types.swift index 869e1929f48..91f6a8c72de 100644 --- a/test/ModuleInterface/nonescapable_types.swift +++ b/test/ModuleInterface/nonescapable_types.swift @@ -3,6 +3,8 @@ // RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name Test // RUN: %FileCheck %s < %t.swiftinterface +// REQUIRES: swift_feature_NonescapableTypes + // CHECK: #if compiler(>=5.3) && $NonescapableTypes // CHECK: public protocol P : ~Escapable { // CHECK: associatedtype A diff --git a/test/ModuleInterface/option-filtering.swift b/test/ModuleInterface/option-filtering.swift index 80bcd7da6aa..4a162c108a0 100644 --- a/test/ModuleInterface/option-filtering.swift +++ b/test/ModuleInterface/option-filtering.swift @@ -2,6 +2,11 @@ // RUN: %target-swift-frontend -enable-library-evolution -emit-module-interface-path %t.swiftinterface -module-name t %s -target-min-inlining-version 42 -emit-module -o /dev/null -O -enable-experimental-feature LayoutStringValueWitnesses -enable-experimental-feature LayoutStringValueWitnessesInstantiation -enable-experimental-feature MoveOnlyClasses -enable-experimental-feature NoImplicitCopy // RUN: %FileCheck %s < %t.swiftinterface -check-prefix=CHECK-SWIFTINTERFACE + +// REQUIRES: swift_feature_LayoutStringValueWitnesses +// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_NoImplicitCopy // // CHECK-SWIFTINTERFACE-NOT: -enable-experimental-feature LayoutStringValueWitnesses // CHECK-SWIFTINTERFACE-NOT: -enable-experimental-feature LayoutStringValueWitnessesInstantiation diff --git a/test/ModuleInterface/preconcurrency_conformances.swift b/test/ModuleInterface/preconcurrency_conformances.swift index 03de0fe07b7..477ceb88bca 100644 --- a/test/ModuleInterface/preconcurrency_conformances.swift +++ b/test/ModuleInterface/preconcurrency_conformances.swift @@ -24,8 +24,8 @@ // RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface) -I %t -module-name Client \ // RUN: -target %target-swift-5.1-abi-triple -enable-upcoming-feature DynamicActorIsolation -verify -// REQUIRES: asserts // REQUIRES: concurrency +// REQUIRES: swift_feature_DynamicActorIsolation //--- A.swift public protocol P { diff --git a/test/ModuleInterface/stored-properties-client.swift b/test/ModuleInterface/stored-properties-client.swift index a2943b0c9f8..2cc5518ff8e 100644 --- a/test/ModuleInterface/stored-properties-client.swift +++ b/test/ModuleInterface/stored-properties-client.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // REQUIRES: executable_test +// REQUIRES: swift_feature_StructLetDestructuring // 1. Build ../stored-properties.swift to a dylib and emit its interface in %t diff --git a/test/ModuleInterface/stored-properties.swift b/test/ModuleInterface/stored-properties.swift index c331bf7f23e..860806dd7a3 100644 --- a/test/ModuleInterface/stored-properties.swift +++ b/test/ModuleInterface/stored-properties.swift @@ -14,6 +14,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature StructLetDestructuring -emit-module -o %t/TestResilient.swiftmodule -module-name StoredProperties -enable-library-evolution %t-resilient.swiftinterface -disable-objc-attr-requires-foundation-module // RUN: %target-swift-frontend -enable-experimental-feature StructLetDestructuring -emit-module -o /dev/null -merge-modules %t/TestResilient.swiftmodule -module-name StoredProperties -enable-library-evolution -emit-module-interface-path - | %FileCheck %s --check-prefix RESILIENT --check-prefix COMMON +// REQUIRES: swift_feature_StructLetDestructuring + // COMMON: public struct HasStoredProperties { public struct HasStoredProperties { // COMMON: public var computedGetter: Swift.Int { diff --git a/test/ModuleInterface/swift-export-as.swift b/test/ModuleInterface/swift-export-as.swift index 086ea991d17..b0ae1e22de0 100644 --- a/test/ModuleInterface/swift-export-as.swift +++ b/test/ModuleInterface/swift-export-as.swift @@ -65,6 +65,8 @@ // RUN: cat %t/ClientLib.swiftinterface | %FileCheck --check-prefixes=CLIENT-PUBLIC %s // RUN: cat %t/ClientLib.private.swiftinterface | %FileCheck --check-prefixes=CLIENT-PRIVATE %s +// REQUIRES: swift_feature_ModuleInterfaceExportAs + //--- PrivateLib.swift public struct PrivateNameStruct {} diff --git a/test/ModuleInterface/value_generics.swift b/test/ModuleInterface/value_generics.swift index 7f4afcc33be..b728c3f9b7e 100644 --- a/test/ModuleInterface/value_generics.swift +++ b/test/ModuleInterface/value_generics.swift @@ -3,6 +3,8 @@ // RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name ValueGeneric -disable-availability-checking -disable-experimental-parser-round-trip // RUN: %FileCheck %s < %t.swiftinterface +// REQUIRES: swift_feature_ValueGenerics + // CHECK: public struct Vector public struct Vector { // CHECK-LABEL: public var count: Swift.Int { diff --git a/test/NameLookup/members_transitive.swift b/test/NameLookup/members_transitive.swift index f16ffc39888..d6e94b5b4f0 100644 --- a/test/NameLookup/members_transitive.swift +++ b/test/NameLookup/members_transitive.swift @@ -6,6 +6,8 @@ // RUN: %target-swift-frontend -typecheck %s -I %t -verify -swift-version 6 -package-name TestPackage -verify-additional-prefix ambiguity- // RUN: %target-swift-frontend -typecheck %s -I %t -verify -swift-version 5 -package-name TestPackage -enable-upcoming-feature MemberImportVisibility -verify-additional-prefix member-visibility- +// REQUIRES: swift_feature_MemberImportVisibility + import members_C // expected-member-visibility-note 16{{add import of module 'members_B'}}{{1-1=internal import members_B\n}} diff --git a/test/NameLookup/members_transitive_multifile.swift b/test/NameLookup/members_transitive_multifile.swift index 12acc8631e1..4a37c69759e 100644 --- a/test/NameLookup/members_transitive_multifile.swift +++ b/test/NameLookup/members_transitive_multifile.swift @@ -7,6 +7,8 @@ // RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %t/A.swift %t/B.swift %t/C.swift -I %t -verify -swift-version 6 // RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %t/A.swift %t/B.swift %t/C.swift -I %t -verify -swift-version 5 -enable-upcoming-feature MemberImportVisibility -verify-additional-prefix member-visibility- +// REQUIRES: swift_feature_MemberImportVisibility + //--- main.swift // expected-member-visibility-note@+2 {{add import of module 'members_A'}}{{1-1=@_implementationOnly import members_A\n}} diff --git a/test/NameLookup/members_transitive_multifile_access_level.swift b/test/NameLookup/members_transitive_multifile_access_level.swift index 5997e7ab85b..4e72f97d235 100644 --- a/test/NameLookup/members_transitive_multifile_access_level.swift +++ b/test/NameLookup/members_transitive_multifile_access_level.swift @@ -33,6 +33,9 @@ // RUN: -enable-upcoming-feature InternalImportsByDefault \ // RUN: -verify-additional-prefix internal-by-default- +// REQUIRES: swift_feature_InternalImportsByDefault +// REQUIRES: swift_feature_MemberImportVisibility + //--- function_bodies.swift // FIXME: The access level on the fix-it for PackageUsesOnly is wrong. diff --git a/test/NameLookup/members_transitive_objc.swift b/test/NameLookup/members_transitive_objc.swift index 58f9c464d19..c1d3dc00260 100644 --- a/test/NameLookup/members_transitive_objc.swift +++ b/test/NameLookup/members_transitive_objc.swift @@ -8,6 +8,7 @@ // RUN: %target-swift-frontend -typecheck %s -I %t -I %S/Inputs/MemberImportVisibility -import-objc-header %S/Inputs/MemberImportVisibility/Bridging.h -verify -swift-version 5 -enable-upcoming-feature MemberImportVisibility -verify-additional-prefix member-visibility- // REQUIRES: objc_interop +// REQUIRES: swift_feature_MemberImportVisibility import Categories_B import Categories_E diff --git a/test/NameLookup/members_transitive_underlying_clang.swift b/test/NameLookup/members_transitive_underlying_clang.swift index fe819b157ca..af55c3e98ae 100644 --- a/test/NameLookup/members_transitive_underlying_clang.swift +++ b/test/NameLookup/members_transitive_underlying_clang.swift @@ -4,6 +4,8 @@ // RUN: %target-swift-frontend -typecheck -primary-file %t/Primary.swift %t/Other.swift -I %S/Inputs/MemberImportVisibility -module-name Underlying -verify -swift-version 6 // RUN: %target-swift-frontend -typecheck -primary-file %t/Primary.swift %t/Other.swift -I %S/Inputs/MemberImportVisibility -module-name Underlying -verify -swift-version 5 -enable-upcoming-feature MemberImportVisibility +// REQUIRES: swift_feature_MemberImportVisibility + //--- Other.swift @_exported import Underlying diff --git a/test/Parse/coroutine_accessors.swift b/test/Parse/coroutine_accessors.swift index 0b4d9277fb0..7e4515c4445 100644 --- a/test/Parse/coroutine_accessors.swift +++ b/test/Parse/coroutine_accessors.swift @@ -6,7 +6,7 @@ // RUN: -verify-additional-prefix disabled- \ // RUN: -debug-diagnostic-names -// REQUIRES: asserts +// REQUIRES: swift_feature_CoroutineAccessors var _i: Int = 0 diff --git a/test/Parse/coroutine_accessors_ambiguity.swift b/test/Parse/coroutine_accessors_ambiguity.swift index 5e3ae6134ce..90aa16252f9 100644 --- a/test/Parse/coroutine_accessors_ambiguity.swift +++ b/test/Parse/coroutine_accessors_ambiguity.swift @@ -6,7 +6,7 @@ // RUN: -verify-additional-prefix disabled- \ // RUN: -debug-diagnostic-names -// REQUIRES: asserts +// REQUIRES: swift_feature_CoroutineAccessors // Properties with implicit getters which call functions named modify. diff --git a/test/Parse/extractConstantsFromMembers_attr.swift b/test/Parse/extractConstantsFromMembers_attr.swift index 1cd51cd96e0..a1be209dc33 100644 --- a/test/Parse/extractConstantsFromMembers_attr.swift +++ b/test/Parse/extractConstantsFromMembers_attr.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -parse -enable-experimental-feature ExtractConstantsFromMembers -// REQUIRES: asserts +// REQUIRES: swift_feature_ExtractConstantsFromMembers @extractConstantsFromMembers protocol MyProto {} diff --git a/test/Parse/features.swift b/test/Parse/features.swift index 2a068a3c5a1..cc7e61c6155 100644 --- a/test/Parse/features.swift +++ b/test/Parse/features.swift @@ -1,7 +1,8 @@ // RUN: not %target-swift-frontend -typecheck %s 2>&1 | %FileCheck --check-prefix=CHECK-WITHOUT %s // RUN: %target-typecheck-verify-swift -enable-experimental-static-assert // RUN: %target-typecheck-verify-swift -enable-experimental-feature StaticAssert -// REQUIRES: asserts + +// REQUIRES: swift_feature_StaticAssert #if compiler(>=5.3) && $StaticAssert #assert(true) diff --git a/test/Parse/inverses.swift b/test/Parse/inverses.swift index b597b38d038..6ed4199183e 100644 --- a/test/Parse/inverses.swift +++ b/test/Parse/inverses.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature SuppressedAssociatedTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes + protocol U {} enum Maybe : ~Copyable {} diff --git a/test/Parse/lifetime_attr.swift b/test/Parse/lifetime_attr.swift index cec7c28d615..00688da1209 100644 --- a/test/Parse/lifetime_attr.swift +++ b/test/Parse/lifetime_attr.swift @@ -1,5 +1,6 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature NonescapableTypes -// REQUIRES: asserts + +// REQUIRES: swift_feature_NonescapableTypes struct E {} diff --git a/test/Parse/matching_patterns_reference_bindings.swift b/test/Parse/matching_patterns_reference_bindings.swift index b072ae48bc3..779d657b383 100644 --- a/test/Parse/matching_patterns_reference_bindings.swift +++ b/test/Parse/matching_patterns_reference_bindings.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -swift-version 4 -I %S/Inputs -enable-source-import -enable-experimental-feature ReferenceBindings +// REQUIRES: swift_feature_ReferenceBindings + import imported_enums // TODO: Implement tuple equality in the library. diff --git a/test/Parse/new_parser_diagnostics.swift b/test/Parse/new_parser_diagnostics.swift index 154f8da9393..c723addd35a 100644 --- a/test/Parse/new_parser_diagnostics.swift +++ b/test/Parse/new_parser_diagnostics.swift @@ -1,5 +1,5 @@ // REQUIRES: swift_swift_parser -// REQUIRES: asserts +// REQUIRES: swift_feature_ParserDiagnostics // RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserDiagnostics diff --git a/test/Parse/pattern_without_variables_reference_bindings.swift b/test/Parse/pattern_without_variables_reference_bindings.swift index 21fbf9bbc1c..f3ecf762078 100644 --- a/test/Parse/pattern_without_variables_reference_bindings.swift +++ b/test/Parse/pattern_without_variables_reference_bindings.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -parse-as-library -enable-experimental-feature ReferenceBindings -// REQUIRES: asserts +// REQUIRES: swift_feature_ReferenceBindings let _ = 1 // expected-error{{global variable declaration does not bind any variables}} diff --git a/test/Parse/sending.swift b/test/Parse/sending.swift index 8602f606e60..3080e5b11c0 100644 --- a/test/Parse/sending.swift +++ b/test/Parse/sending.swift @@ -1,6 +1,7 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature SendingArgsAndResults -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation +// REQUIRES: swift_feature_SendingArgsAndResults func testArg(_ x: sending String) { } diff --git a/test/Parse/trailing-comma-experimental.swift b/test/Parse/trailing-comma-experimental.swift index a3712fc47d3..3dea7d656ac 100644 --- a/test/Parse/trailing-comma-experimental.swift +++ b/test/Parse/trailing-comma-experimental.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature TrailingComma -// REQUIRES: asserts +// REQUIRES: swift_feature_TrailingComma // Condition List diff --git a/test/Parse/trailing_closures.swift b/test/Parse/trailing_closures.swift index 17bffade903..e007f1ed953 100644 --- a/test/Parse/trailing_closures.swift +++ b/test/Parse/trailing_closures.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ClosureIsolation -// REQUIRES: asserts +// REQUIRES: swift_feature_ClosureIsolation func foo(a: () -> T, b: () -> U) {} diff --git a/test/Parse/validate_new_parser_diagnostics.swift b/test/Parse/validate_new_parser_diagnostics.swift index d7fef3f8a84..2975b6f6f14 100644 --- a/test/Parse/validate_new_parser_diagnostics.swift +++ b/test/Parse/validate_new_parser_diagnostics.swift @@ -1,5 +1,5 @@ // REQUIRES: swift_swift_parser -// REQUIRES: asserts +// REQUIRES: swift_feature_ParserValidation // Checks that skipping function bodies doesn't cause the new parser validation // to fail. This can currently be the case because the new parser doesn't diff --git a/test/PlaygroundTransform/extended_callbacks.swift b/test/PlaygroundTransform/extended_callbacks.swift index 5632bce4417..16d414095d4 100644 --- a/test/PlaygroundTransform/extended_callbacks.swift +++ b/test/PlaygroundTransform/extended_callbacks.swift @@ -8,6 +8,7 @@ // RUN: %target-codesign %t/main2 // RUN: %target-run %t/main2 | %FileCheck %s // REQUIRES: executable_test +// REQUIRES: swift_feature_PlaygroundExtendedCallbacks import PlaygroundSupport diff --git a/test/PrintAsObjC/objc_implementation.swift b/test/PrintAsObjC/objc_implementation.swift index 524bf42a39f..dd069d7880b 100644 --- a/test/PrintAsObjC/objc_implementation.swift +++ b/test/PrintAsObjC/objc_implementation.swift @@ -1,6 +1,7 @@ // Please keep this file in alphabetical order! // REQUIRES: objc_interop +// REQUIRES: swift_feature_CImplementation // Temporarily disable on arm64e (rdar://127675057) // UNSUPPORTED: CPU=arm64e diff --git a/test/Prototypes/UnfairLock.swift b/test/Prototypes/UnfairLock.swift index 4c9baa8d603..c544a209125 100644 --- a/test/Prototypes/UnfairLock.swift +++ b/test/Prototypes/UnfairLock.swift @@ -5,6 +5,8 @@ // REQUIRES: OS=macosx // REQUIRES: executable_test +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_RawLayout import Builtin import Darwin diff --git a/test/Prototypes/Vector.swift b/test/Prototypes/Vector.swift index e63d290dd69..1c8292fd214 100644 --- a/test/Prototypes/Vector.swift +++ b/test/Prototypes/Vector.swift @@ -2,6 +2,8 @@ // RUN: %target-swift-frontend -target %module-target-future -enable-experimental-feature ValueGenerics -enable-experimental-feature BuiltinModule -disable-experimental-parser-round-trip -emit-module %s -o %t/Vector.swiftmodule // REQUIRES: executable_test +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_ValueGenerics // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/Runtime/bitwise-borrowable-generics.swift b/test/Runtime/bitwise-borrowable-generics.swift index 320fef3726c..d25fb99aa8f 100644 --- a/test/Runtime/bitwise-borrowable-generics.swift +++ b/test/Runtime/bitwise-borrowable-generics.swift @@ -1,5 +1,6 @@ // RUN: %target-run-simple-swift(-enable-experimental-feature RawLayout) // REQUIRES: executable_test +// REQUIRES: swift_feature_RawLayout // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/Runtime/check_create_type.swift b/test/Runtime/check_create_type.swift index 34f2ec47172..27256ef7c29 100644 --- a/test/Runtime/check_create_type.swift +++ b/test/Runtime/check_create_type.swift @@ -1,5 +1,6 @@ // RUN: %target-run-simple-swift(-Xfrontend -disable-availability-checking -enable-experimental-feature ValueGenerics) // REQUIRES: executable_test +// REQUIRES: swift_feature_ValueGenerics // UNSUPPORTED: CPU=arm64e // UNSUPPORTED: use_os_stdlib diff --git a/test/SIL/Parser/basic2.sil b/test/SIL/Parser/basic2.sil index e8ff9b85e49..cb16dc322cc 100644 --- a/test/SIL/Parser/basic2.sil +++ b/test/SIL/Parser/basic2.sil @@ -1,5 +1,7 @@ // RUN: %target-sil-opt %s -enable-experimental-feature ValueGenerics | %target-sil-opt -enable-experimental-feature ValueGenerics | %FileCheck %s +// REQUIRES: swift_feature_ValueGenerics + import Builtin import Swift diff --git a/test/SIL/Parser/basic2_noncopyable_generics.sil b/test/SIL/Parser/basic2_noncopyable_generics.sil index 949f988a5e7..363424da2c9 100644 --- a/test/SIL/Parser/basic2_noncopyable_generics.sil +++ b/test/SIL/Parser/basic2_noncopyable_generics.sil @@ -7,9 +7,10 @@ // RUN: | \ // RUN: %FileCheck %s +// REQUIRES: swift_feature_NonescapableTypes + // For -enable-experimental-feature NonescapableTypes -// REQUIRES: asserts // TODO: Once NoncopyableGenerics/NonescapableTypes is no longer behind a feature flag, merge this into basic2. sil_stage raw diff --git a/test/SIL/Parser/lifetime_dependence.sil b/test/SIL/Parser/lifetime_dependence.sil index 11247d9a1f1..f01b9967901 100644 --- a/test/SIL/Parser/lifetime_dependence.sil +++ b/test/SIL/Parser/lifetime_dependence.sil @@ -1,6 +1,8 @@ // RUN: %target-sil-opt %s \ // RUN: -enable-experimental-feature NonescapableTypes | %FileCheck %s +// REQUIRES: swift_feature_NonescapableTypes + sil_stage canonical import Builtin diff --git a/test/SIL/Serialization/basic2.sil b/test/SIL/Serialization/basic2.sil index 511e15d3b45..d5053af45df 100644 --- a/test/SIL/Serialization/basic2.sil +++ b/test/SIL/Serialization/basic2.sil @@ -4,6 +4,8 @@ // RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.2.sib -module-name basic2 -enable-experimental-feature ValueGenerics // RUN: %target-sil-opt %t/tmp.2.sib -module-name basic2 -emit-sorted-sil -enable-experimental-feature ValueGenerics | %FileCheck %s +// REQUIRES: swift_feature_ValueGenerics + import Builtin import Swift diff --git a/test/SIL/explicit_lifetime_dependence_specifiers.swift b/test/SIL/explicit_lifetime_dependence_specifiers.swift index 30a54dea6fb..385e160d5de 100644 --- a/test/SIL/explicit_lifetime_dependence_specifiers.swift +++ b/test/SIL/explicit_lifetime_dependence_specifiers.swift @@ -7,6 +7,8 @@ // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). +// REQUIRES: swift_feature_NonescapableTypes + import Builtin struct BufferView : ~Escapable { diff --git a/test/SIL/implicit_lifetime_dependence.swift b/test/SIL/implicit_lifetime_dependence.swift index c140df342b3..19efd8f717b 100644 --- a/test/SIL/implicit_lifetime_dependence.swift +++ b/test/SIL/implicit_lifetime_dependence.swift @@ -4,7 +4,8 @@ // RUN: -disable-experimental-parser-round-trip \ // RUN: | %FileCheck %s // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts + +// REQUIRES: swift_feature_NonescapableTypes struct BufferView : ~Escapable { let ptr: UnsafeRawBufferPointer @@ -52,7 +53,7 @@ func testBasic() { let view = BufferView($0, a.count) let derivedView = derive(view) let newView = consumeAndCreate(derivedView) - use(newView) + use(newView) } } @@ -147,7 +148,7 @@ struct GenericBufferView : ~Escapable { precondition(count >= 0, "Count must not be negative") self.baseAddress = baseAddress self.count = count - } + } subscript(position: Pointer) -> Element { get { if _isPOD(Element.self) { diff --git a/test/SIL/lifetime_dependence_generics.swift b/test/SIL/lifetime_dependence_generics.swift index 6a46f949117..e56247a4926 100644 --- a/test/SIL/lifetime_dependence_generics.swift +++ b/test/SIL/lifetime_dependence_generics.swift @@ -5,8 +5,9 @@ // RUN: | %FileCheck %s // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes protocol P { associatedtype E: ~Escapable diff --git a/test/SIL/lifetime_dependence_param_position_test.swift b/test/SIL/lifetime_dependence_param_position_test.swift index c694404d46e..71c0c6cfd4a 100644 --- a/test/SIL/lifetime_dependence_param_position_test.swift +++ b/test/SIL/lifetime_dependence_param_position_test.swift @@ -3,8 +3,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes public struct Span : ~Escapable { diff --git a/test/SIL/lifetime_dependence_span_lifetime_attr.swift b/test/SIL/lifetime_dependence_span_lifetime_attr.swift index 1889d2d01f4..e10f9108cf7 100644 --- a/test/SIL/lifetime_dependence_span_lifetime_attr.swift +++ b/test/SIL/lifetime_dependence_span_lifetime_attr.swift @@ -2,8 +2,8 @@ // RUN: -enable-experimental-feature NonescapableTypes \ // RUN: -disable-experimental-parser-round-trip | %FileCheck %s -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // TODO: Use real Range public struct FakeRange { diff --git a/test/SIL/modules-extern.swift b/test/SIL/modules-extern.swift index 022c3655b93..e837b6c6db0 100644 --- a/test/SIL/modules-extern.swift +++ b/test/SIL/modules-extern.swift @@ -4,6 +4,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature Extern -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-as-library // RUN: %target-swift-frontend -enable-experimental-feature Extern -c -I %t %t/Main.swift -o %t/a.o +// REQUIRES: swift_feature_Extern + // BEGIN MyModule.swift @_extern(c) diff --git a/test/SIL/type_lowering_unit.sil b/test/SIL/type_lowering_unit.sil index 0986d78f00b..bd2382ead56 100644 --- a/test/SIL/type_lowering_unit.sil +++ b/test/SIL/type_lowering_unit.sil @@ -2,6 +2,8 @@ // RUN: -enable-experimental-feature NonescapableTypes \ // RUN: %s -o /dev/null 2>&1 | %FileCheck %s +// REQUIRES: swift_feature_NonescapableTypes + sil_stage raw import Builtin diff --git a/test/SILGen/bitwise_copyable.swift b/test/SILGen/bitwise_copyable.swift index 14ce9f5c407..7cecf34d79c 100644 --- a/test/SILGen/bitwise_copyable.swift +++ b/test/SILGen/bitwise_copyable.swift @@ -5,7 +5,7 @@ // RUN: -enable-experimental-feature Sensitive \ // RUN: -enable-builtin-module -// REQUIRES: asserts +// REQUIRES: swift_feature_Sensitive // Force verification of TypeLowering's isTrivial. diff --git a/test/SILGen/bitwise_copyable_stdlib.swift b/test/SILGen/bitwise_copyable_stdlib.swift index 22c6d08789c..88c3a8c9cf2 100644 --- a/test/SILGen/bitwise_copyable_stdlib.swift +++ b/test/SILGen/bitwise_copyable_stdlib.swift @@ -10,7 +10,8 @@ // RUN: -enable-experimental-feature NonescapableTypes \ // RUN: -enable-builtin-module -// REQUIRES: asserts +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_NonescapableTypes // Force verification of TypeLowering's isTrivial. diff --git a/test/SILGen/builtin_vector.swift b/test/SILGen/builtin_vector.swift index 56bd6bcc27a..1ab63c3a973 100644 --- a/test/SILGen/builtin_vector.swift +++ b/test/SILGen/builtin_vector.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-emit-silgen -disable-experimental-parser-round-trip -disable-availability-checking -enable-experimental-feature ValueGenerics -enable-experimental-feature BuiltinModule %s | %FileCheck %s +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_ValueGenerics + import Builtin struct MyVector: ~Copyable { diff --git a/test/SILGen/closures.swift b/test/SILGen/closures.swift index e89743d70af..1ae39036512 100644 --- a/test/SILGen/closures.swift +++ b/test/SILGen/closures.swift @@ -2,6 +2,8 @@ // RUN: %target-swift-emit-silgen -module-name closures -parse-stdlib -parse-as-library %s -enable-experimental-feature ValueGenerics -disable-availability-checking | %FileCheck %s // RUN: %target-swift-emit-silgen -module-name closures -parse-stdlib -parse-as-library %s -enable-experimental-feature ValueGenerics -disable-availability-checking | %FileCheck %s --check-prefix=GUARANTEED +// REQUIRES: swift_feature_ValueGenerics + import Swift var zero = 0 diff --git a/test/SILGen/copy_expr.swift b/test/SILGen/copy_expr.swift index efea527e08e..1cb51175f87 100644 --- a/test/SILGen/copy_expr.swift +++ b/test/SILGen/copy_expr.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature NoImplicitCopy %s | %FileCheck %s +// REQUIRES: swift_feature_NoImplicitCopy + final class Klass { var k: Klass? = nil } diff --git a/test/SILGen/coroutine_accessors.swift b/test/SILGen/coroutine_accessors.swift index 17d2bdeb26c..0c0d6d49322 100644 --- a/test/SILGen/coroutine_accessors.swift +++ b/test/SILGen/coroutine_accessors.swift @@ -11,7 +11,8 @@ // RUN: -enable-experimental-feature CoroutineAccessorsUnwindOnCallerError \ // RUN: | %FileCheck %s --check-prefixes=CHECK,CHECK-UNWIND -// REQUIRES: asserts +// REQUIRES: swift_feature_CoroutineAccessors +// REQUIRES: swift_feature_CoroutineAccessorsUnwindOnCallerError @frozen public struct S { diff --git a/test/SILGen/discard.swift b/test/SILGen/discard.swift index afcf501f534..912375e96ff 100644 --- a/test/SILGen/discard.swift +++ b/test/SILGen/discard.swift @@ -4,6 +4,7 @@ // Swift sources are require to remove struct_extract so this check-not line passes: // "CHECK-SIL-NOT: struct_extract" // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_MoveOnlyEnumDeinits func invokedDeinit() {} diff --git a/test/SILGen/do_expr.swift b/test/SILGen/do_expr.swift index 62aec26fb79..2b4a264f75c 100644 --- a/test/SILGen/do_expr.swift +++ b/test/SILGen/do_expr.swift @@ -1,8 +1,8 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature ThenStatements -enable-experimental-feature DoExpressions %s | %FileCheck %s // RUN: %target-swift-emit-ir -enable-experimental-feature ThenStatements -enable-experimental-feature DoExpressions %s -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_DoExpressions +// REQUIRES: swift_feature_ThenStatements @discardableResult func throwsError(_ x: Int = 0) throws -> Int { 0 } diff --git a/test/SILGen/do_expr_address_only_tuple_return_value_context.swift b/test/SILGen/do_expr_address_only_tuple_return_value_context.swift index ad2975ed4d6..2e99f385696 100644 --- a/test/SILGen/do_expr_address_only_tuple_return_value_context.swift +++ b/test/SILGen/do_expr_address_only_tuple_return_value_context.swift @@ -1,7 +1,6 @@ // RUN: %target-swift-emit-silgen -verify -enable-experimental-feature DoExpressions %s -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_DoExpressions struct BigNontrivialThing { var x: Any diff --git a/test/SILGen/extern_c.swift b/test/SILGen/extern_c.swift index 15ef12b3e2e..dc27d977de7 100644 --- a/test/SILGen/extern_c.swift +++ b/test/SILGen/extern_c.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature Extern %s | %FileCheck %s +// REQUIRES: swift_feature_Extern + // CHECK-DAG: sil hidden_external @my_c_name : $@convention(c) (Int) -> Int @_extern(c, "my_c_name") func withCName(_ x: Int) -> Int diff --git a/test/SILGen/if_expr.swift b/test/SILGen/if_expr.swift index dbdff859ac0..d74e2d402df 100644 --- a/test/SILGen/if_expr.swift +++ b/test/SILGen/if_expr.swift @@ -1,8 +1,7 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature ThenStatements %s | %FileCheck %s // RUN: %target-swift-emit-ir -enable-experimental-feature ThenStatements %s -// Needed for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_ThenStatements func foo() -> Int { if .random() { 1 } else { 2 } diff --git a/test/SILGen/inlinable_attribute.swift b/test/SILGen/inlinable_attribute.swift index 032f4ba8def..9df86be46b5 100644 --- a/test/SILGen/inlinable_attribute.swift +++ b/test/SILGen/inlinable_attribute.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature IsolatedDeinit -module-name inlinable_attribute -emit-verbose-sil -warnings-as-errors -target %target-swift-5.1-abi-triple %s | %FileCheck %s +// REQUIRES: swift_feature_IsolatedDeinit + // CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute15fragileFunctionyyF : $@convention(thin) () -> () @inlinable public func fragileFunction() { diff --git a/test/SILGen/keypaths.swift b/test/SILGen/keypaths.swift index a1189e164b1..28478197783 100644 --- a/test/SILGen/keypaths.swift +++ b/test/SILGen/keypaths.swift @@ -1,7 +1,8 @@ // RUN: %target-swift-emit-silgen -target %target-swift-5.1-abi-triple -disable-experimental-parser-round-trip -parse-stdlib -module-name keypaths %s | %FileCheck %s // FIXME: Remove '-disable-experimental-parser-round-trip'. -// REQUIRES: asserts +// REQUIRES: swift_feature_KeyPathWithStaticMembers + import Swift diff --git a/test/SILGen/mangling_inverse_generics.swift b/test/SILGen/mangling_inverse_generics.swift index 21e8ccfb138..a018f87406d 100644 --- a/test/SILGen/mangling_inverse_generics.swift +++ b/test/SILGen/mangling_inverse_generics.swift @@ -7,6 +7,8 @@ // RUN: %FileCheck %s < %t/test.silgen // RUN: %swift-demangle < %t/test.silgen | %FileCheck %s --check-prefix=DEMANGLED +// REQUIRES: swift_feature_NonescapableTypes + protocol NoncopyableProto: ~Copyable {} diff --git a/test/SILGen/mangling_inverse_generics_basic.swift b/test/SILGen/mangling_inverse_generics_basic.swift index 153c796f146..cad7fb19171 100644 --- a/test/SILGen/mangling_inverse_generics_basic.swift +++ b/test/SILGen/mangling_inverse_generics_basic.swift @@ -6,6 +6,8 @@ // RUN: %FileCheck %s < %t/test.silgen // RUN: %swift-demangle < %t/test.silgen | %FileCheck %s --check-prefix=DEMANGLED +// REQUIRES: swift_feature_NonescapableTypes + struct Basic { // DEMANGLED: (extension in test):test.Basic< where A: ~Swift.Copyable>.cali2() -> () // CHECK: $s4test5BasicVAARi_zrlE5cali2yyF diff --git a/test/SILGen/moveonly_deinits.swift b/test/SILGen/moveonly_deinits.swift index 99abbf9998c..0087d0e7c53 100644 --- a/test/SILGen/moveonly_deinits.swift +++ b/test/SILGen/moveonly_deinits.swift @@ -2,6 +2,8 @@ // RUN: %target-swift-emit-sil -enable-experimental-feature MoveOnlyEnumDeinits %s | %FileCheck -check-prefix=SIL %s // RUN: %target-swift-emit-sil -O -sil-verify-all -enable-experimental-feature MoveOnlyEnumDeinits %s +// REQUIRES: swift_feature_MoveOnlyEnumDeinits + // Test that makes sure that throughout the pipeline we properly handle // conditional releases for trivial and non-trivial move only types. diff --git a/test/SILGen/moveonly_escaping_closure.swift b/test/SILGen/moveonly_escaping_closure.swift index 64dd99a9be7..86410701726 100644 --- a/test/SILGen/moveonly_escaping_closure.swift +++ b/test/SILGen/moveonly_escaping_closure.swift @@ -4,6 +4,8 @@ // FIXME: we should add -sil-verify-all to the below. rdar://109477976 (moveonly_escaping_closure.swift fails with -sil-verify-all) // RUN: %target-swift-emit-sil -O -enable-experimental-feature NoImplicitCopy -module-name moveonly_closure -verify %s +// REQUIRES: swift_feature_NoImplicitCopy + struct Empty: ~Copyable {} struct SingleElt: ~Copyable { diff --git a/test/SILGen/moveonly_library_evolution.swift b/test/SILGen/moveonly_library_evolution.swift index df5bd479c45..7cb26357741 100644 --- a/test/SILGen/moveonly_library_evolution.swift +++ b/test/SILGen/moveonly_library_evolution.swift @@ -1,6 +1,8 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature NoImplicitCopy -enable-library-evolution %s | %FileCheck %s // RUN: %target-swift-emit-sil -O -sil-verify-all -enable-experimental-feature NoImplicitCopy -enable-library-evolution %s +// REQUIRES: swift_feature_NoImplicitCopy + //////////////////////// // MARK: Declarations // //////////////////////// diff --git a/test/SILGen/moveonly_var.swift b/test/SILGen/moveonly_var.swift index acdff7f6f72..c8e36e0cb40 100644 --- a/test/SILGen/moveonly_var.swift +++ b/test/SILGen/moveonly_var.swift @@ -1,6 +1,8 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature MoveOnlyClasses %s | %FileCheck %s // RUN: %target-swift-emit-sil -O -sil-verify-all -enable-experimental-feature MoveOnlyClasses %s | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyClasses + ////////////////// // Declarations // ////////////////// diff --git a/test/SILGen/preconcurrency_conformances.swift b/test/SILGen/preconcurrency_conformances.swift index 7513f70159e..9a88b4e63f4 100644 --- a/test/SILGen/preconcurrency_conformances.swift +++ b/test/SILGen/preconcurrency_conformances.swift @@ -4,8 +4,8 @@ // RUN: %target-swift-emit-silgen -target %target-swift-5.1-abi-triple -module-name preconcurrency_conformances -enable-upcoming-feature DynamicActorIsolation %t/src/checks.swift -verify | %FileCheck %t/src/checks.swift // RUN: %target-swift-emit-silgen -swift-version 6 -target %target-swift-5.1-abi-triple -module-name preconcurrency_conformances -disable-dynamic-actor-isolation %t/src/checks_disabled.swift -verify | %FileCheck %t/src/checks_disabled.swift -// REQUIRES: asserts // REQUIRES: concurrency +// REQUIRES: swift_feature_DynamicActorIsolation //--- checks.swift protocol P { diff --git a/test/SILGen/preconcurrency_conformances_backdeploy.swift b/test/SILGen/preconcurrency_conformances_backdeploy.swift index df8f021b279..fdfbed9a64d 100644 --- a/test/SILGen/preconcurrency_conformances_backdeploy.swift +++ b/test/SILGen/preconcurrency_conformances_backdeploy.swift @@ -1,8 +1,8 @@ // RUN: %target-swift-frontend -primary-file %s -target %target-cpu-apple-macosx10.14 -enable-upcoming-feature DynamicActorIsolation -emit-silgen -o - | %FileCheck %s -// REQUIRES: asserts // REQUIRES: concurrency // REQUIRES: OS=macosx +// REQUIRES: swift_feature_DynamicActorIsolation protocol P { associatedtype T diff --git a/test/SILGen/raw_layout.swift b/test/SILGen/raw_layout.swift index b70173d5947..461ceb03d3f 100644 --- a/test/SILGen/raw_layout.swift +++ b/test/SILGen/raw_layout.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature RawLayout -enable-builtin-module %s | %FileCheck %s +// REQUIRES: swift_feature_RawLayout + // CHECK: @_rawLayout(size: 4, alignment: 4) struct Lock : ~Copyable diff --git a/test/SILGen/read_requirements.swift b/test/SILGen/read_requirements.swift index 9306a078b9d..2b988af2b5b 100644 --- a/test/SILGen/read_requirements.swift +++ b/test/SILGen/read_requirements.swift @@ -11,8 +11,10 @@ // RUN: -enable-experimental-feature CoroutineAccessorsUnwindOnCallerError \ // RUN: | %FileCheck %s --check-prefixes=CHECK,CHECK-UNWIND,CHECK-%target-abi-stability +// REQUIRES: swift_feature_CoroutineAccessors +// REQUIRES: swift_feature_CoroutineAccessorsUnwindOnCallerError + // For CoroutineAccessorsUnwindOnCallerError -// REQUIRES: asserts // A read requirement may be satisfied by // - a stored property diff --git a/test/SILGen/reference_bindings.swift b/test/SILGen/reference_bindings.swift index 770c3348129..cc0032ab78b 100644 --- a/test/SILGen/reference_bindings.swift +++ b/test/SILGen/reference_bindings.swift @@ -1,6 +1,8 @@ // RUN: %target-swift-frontend -emit-silgen -enable-experimental-feature ReferenceBindings -o - %s | %FileCheck %s // RUN: %target-swift-frontend -emit-sil -sil-verify-all -enable-experimental-feature ReferenceBindings -o - %s | %FileCheck -check-prefix=SIL %s +// REQUIRES: swift_feature_ReferenceBindings + class Klass {} struct S { var k = Klass() diff --git a/test/SILGen/silgen_name_conflict.swift b/test/SILGen/silgen_name_conflict.swift index e0d465daf58..f4845d744a8 100644 --- a/test/SILGen/silgen_name_conflict.swift +++ b/test/SILGen/silgen_name_conflict.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-silgen %s -enable-experimental-feature Extern -verify +// REQUIRES: swift_feature_Extern + @_silgen_name("my_extern_func") func my_extern_func1() // expected-note {{function declared here}} diff --git a/test/SILGen/switch_expr.swift b/test/SILGen/switch_expr.swift index f28cf96c68c..1901f50df93 100644 --- a/test/SILGen/switch_expr.swift +++ b/test/SILGen/switch_expr.swift @@ -1,8 +1,7 @@ // RUN: %target-swift-emit-silgen -enable-experimental-feature ThenStatements %s | %FileCheck %s // RUN: %target-swift-emit-ir -enable-experimental-feature ThenStatements %s -// Needed for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_ThenStatements func foo() -> Int { switch Bool.random() { diff --git a/test/SILGen/typed_throws_generic.swift b/test/SILGen/typed_throws_generic.swift index f52f7b81d9f..dd7f356dc3b 100644 --- a/test/SILGen/typed_throws_generic.swift +++ b/test/SILGen/typed_throws_generic.swift @@ -1,6 +1,6 @@ // RUN: %target-swift-emit-silgen %s -enable-experimental-feature FullTypedThrows | %FileCheck %s -// REQUIRES: asserts +// REQUIRES: swift_feature_FullTypedThrows public func genericThrow(e: E) throws(E) { throw e diff --git a/test/SILGen/typelowering_inverses.swift b/test/SILGen/typelowering_inverses.swift index cf1b383e7c4..0387940022b 100644 --- a/test/SILGen/typelowering_inverses.swift +++ b/test/SILGen/typelowering_inverses.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -emit-silgen -enable-experimental-feature NonescapableTypes -disable-availability-checking -module-name main %s | %FileCheck %s +// REQUIRES: swift_feature_NonescapableTypes + protocol NoCopyP: ~Copyable {} struct NC: ~Copyable {} diff --git a/test/SILOptimizer/access_wmo_diagnose.swift b/test/SILOptimizer/access_wmo_diagnose.swift index 3348e918259..eb9818bcf6d 100644 --- a/test/SILOptimizer/access_wmo_diagnose.swift +++ b/test/SILOptimizer/access_wmo_diagnose.swift @@ -1,6 +1,6 @@ // RUN: %target-swift-frontend -parse-as-library -emit-sil -enforce-exclusivity=checked -primary-file %s -o /dev/null -verify -// REQUIRES: asserts +// REQUIRES: swift_feature_KeyPathWithStaticMembers // AccessEnforcementWMO assumes that the only way to address a global or static // property is via a formal begin_access. If we ever allow keypaths for static diff --git a/test/SILOptimizer/alloc_vector_lowering.sil b/test/SILOptimizer/alloc_vector_lowering.sil index a3493fb1a16..23d7fd23404 100644 --- a/test/SILOptimizer/alloc_vector_lowering.sil +++ b/test/SILOptimizer/alloc_vector_lowering.sil @@ -1,6 +1,7 @@ // RUN: %target-sil-opt %s -alloc-vector-lowering -enable-experimental-feature FixedArrays | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_FixedArrays sil_stage canonical diff --git a/test/SILOptimizer/argument_conventions.sil b/test/SILOptimizer/argument_conventions.sil index 77ba49521d6..34b0abd6465 100644 --- a/test/SILOptimizer/argument_conventions.sil +++ b/test/SILOptimizer/argument_conventions.sil @@ -4,6 +4,7 @@ // RUN: 2>&1 | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes import Builtin diff --git a/test/SILOptimizer/capture_promotion_ownership.sil b/test/SILOptimizer/capture_promotion_ownership.sil index 051e100541a..273766b698d 100644 --- a/test/SILOptimizer/capture_promotion_ownership.sil +++ b/test/SILOptimizer/capture_promotion_ownership.sil @@ -2,6 +2,8 @@ // RUN: -enable-experimental-feature NonescapableTypes -module-name Swift \ // RUN: | %FileCheck %s +// REQUIRES: swift_feature_NonescapableTypes + // Check to make sure that the process of promoting closure captures results in // a correctly cloned and modified closure function body. This test // intentionally only includes one promotable closure so that there is minimal diff --git a/test/SILOptimizer/constant_evaluable_profiler_test.swift b/test/SILOptimizer/constant_evaluable_profiler_test.swift index e7bb055fb15..b55b141538e 100644 --- a/test/SILOptimizer/constant_evaluable_profiler_test.swift +++ b/test/SILOptimizer/constant_evaluable_profiler_test.swift @@ -7,3 +7,5 @@ // RUN: not %target-sil-opt -silgen-cleanup -raw-sil-inst-lowering -allocbox-to-stack -mandatory-inlining -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_profiler_test_silgen.sil > %t/constant_evaluable_profiler_test.sil 2> %t/error-output // // RUN: %FileCheck %S/Inputs/constant_evaluable.swift < %t/error-output + +// REQUIRES: swift_feature_InferSendableFromCaptures diff --git a/test/SILOptimizer/constant_evaluable_subset_test.swift b/test/SILOptimizer/constant_evaluable_subset_test.swift index 457b4e109b2..a425c7a8c8c 100644 --- a/test/SILOptimizer/constant_evaluable_subset_test.swift +++ b/test/SILOptimizer/constant_evaluable_subset_test.swift @@ -17,3 +17,5 @@ // RUN: not %target-sil-opt -opt-mode=speed -silgen-cleanup -diagnose-invalid-escaping-captures -diagnose-static-exclusivity -capture-promotion -access-enforcement-selection -allocbox-to-stack -noreturn-folding -definite-init -raw-sil-inst-lowering -closure-lifetime-fixup -semantic-arc-opts -mandatory-inlining -predictable-memaccess-opts -os-log-optimization -diagnostic-constant-propagation -predictable-deadalloc-elim -mandatory-arc-opts -diagnose-unreachable -diagnose-infinite-recursion -yield-once-check -dataflow-diagnostics -split-non-cond_br-critical-edges -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_silgen.sil > /dev/null 2> %t/error-output-mandatory // // RUN: %FileCheck %S/Inputs/constant_evaluable.swift < %t/error-output-mandatory + +// REQUIRES: swift_feature_InferSendableFromCaptures diff --git a/test/SILOptimizer/definite_init_builtin_vector.swift b/test/SILOptimizer/definite_init_builtin_vector.swift index 7a5ded4a4b1..3f428e0fd42 100644 --- a/test/SILOptimizer/definite_init_builtin_vector.swift +++ b/test/SILOptimizer/definite_init_builtin_vector.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-frontend -emit-sil -disable-experimental-parser-round-trip -disable-availability-checking -enable-experimental-feature ValueGenerics -enable-experimental-feature BuiltinModule %s +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_ValueGenerics + import Builtin struct MyVector: ~Copyable { diff --git a/test/SILOptimizer/devirt_deinits.swift b/test/SILOptimizer/devirt_deinits.swift index 086ed706540..30a972c45e7 100644 --- a/test/SILOptimizer/devirt_deinits.swift +++ b/test/SILOptimizer/devirt_deinits.swift @@ -19,6 +19,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: embedded_stdlib +// REQUIRES: swift_feature_Embedded // UNSUPPORTED: use_os_stdlib diff --git a/test/SILOptimizer/earlycodemotion_moveonly.sil b/test/SILOptimizer/earlycodemotion_moveonly.sil index 257e3ec00ee..5bc3e5820d7 100644 --- a/test/SILOptimizer/earlycodemotion_moveonly.sil +++ b/test/SILOptimizer/earlycodemotion_moveonly.sil @@ -1,5 +1,7 @@ // RUN: %target-sil-opt -enable-sil-verify-all %s -early-codemotion -retain-sinking -enable-experimental-feature MoveOnlyEnumDeinits | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyEnumDeinits + sil_stage canonical import Builtin diff --git a/test/SILOptimizer/functionsigopts.sil b/test/SILOptimizer/functionsigopts.sil index 44dd389b2ab..35f907c50f7 100644 --- a/test/SILOptimizer/functionsigopts.sil +++ b/test/SILOptimizer/functionsigopts.sil @@ -1,6 +1,8 @@ // RUN: %target-sil-opt -sil-inline-generics -enable-sil-verify-all -inline -function-signature-opts -enable-experimental-feature ValueGenerics %s | %FileCheck %s // RUN: %target-sil-opt -sil-inline-generics -enable-sil-verify-all -inline -function-signature-opts -enable-experimental-feature ValueGenerics %s | %FileCheck -check-prefix=CHECK-NEGATIVE %s +// REQUIRES: swift_feature_ValueGenerics + import Builtin import Swift diff --git a/test/SILOptimizer/lifetime_dependence/initializer.swift b/test/SILOptimizer/lifetime_dependence/initializer.swift index b90a614e892..de01f25167d 100644 --- a/test/SILOptimizer/lifetime_dependence/initializer.swift +++ b/test/SILOptimizer/lifetime_dependence/initializer.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct Span: ~Escapable { private var base: UnsafePointer diff --git a/test/SILOptimizer/lifetime_dependence/inout.swift b/test/SILOptimizer/lifetime_dependence/inout.swift index b90a614e892..de01f25167d 100644 --- a/test/SILOptimizer/lifetime_dependence/inout.swift +++ b/test/SILOptimizer/lifetime_dependence/inout.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct Span: ~Escapable { private var base: UnsafePointer diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence.sil b/test/SILOptimizer/lifetime_dependence/lifetime_dependence.sil index 535e08fa55b..34e429bd057 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence.sil +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence.sil @@ -4,8 +4,8 @@ // RUN: -module-name Swift \ // RUN: -enable-experimental-feature NonescapableTypes -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // Test the SIL representation for lifetime dependence. diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_borrow.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_borrow.swift index 0cc398574ab..7a9404cd867 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_borrow.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_borrow.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // Some container-ish thing. struct CN: ~Copyable { diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_borrow_fail.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_borrow_fail.swift index f829ca4e34b..bfaf564a72d 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_borrow_fail.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_borrow_fail.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct BV : ~Escapable { let p: UnsafeRawPointer diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_closure.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_closure.swift index 758311407a7..62683f35aaf 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_closure.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_closure.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct NCInt: ~Copyable { var value: Int diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_diagnostics.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_diagnostics.swift index bb74506cb32..16b7a662761 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_diagnostics.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_diagnostics.swift @@ -6,8 +6,8 @@ // RUN: 2>&1 | %FileCheck %s // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct BV : ~Escapable { let p: UnsafeRawPointer diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_generic.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_generic.swift index bcc0af9351c..672d52a058b 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_generic.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_generic.swift @@ -8,8 +8,9 @@ // RUN: -parse-stdlib -module-name Swift // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_SuppressedAssociatedTypes @_marker public protocol Escapable {} diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_inherit.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_inherit.swift index 0c614bc23a7..447bc37f217 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_inherit.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_inherit.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence should be expressed by a builtin that is // hidden within the function body. diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_inherit_fail.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_inherit_fail.swift index 1bfb74bf18d..a11e7c2e766 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_inherit_fail.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_inherit_fail.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence should be expressed by a builtin that is // hidden within the function body. diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_insertion.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_insertion.swift index d18594962a4..31a28149dfb 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_insertion.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_insertion.swift @@ -7,8 +7,8 @@ // RUN: -o /dev/null 2>&1 | %FileCheck %s // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct BV : ~Escapable { let p: UnsafeRawPointer diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_mutate.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_mutate.swift index b99aa3345cd..891d771af74 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_mutate.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_mutate.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct MutableSpan : ~Escapable, ~Copyable { let base: UnsafeMutableRawPointer diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_optional.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_optional.swift index b81f02d98e1..48a37a04d7f 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_optional.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_optional.swift @@ -6,8 +6,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // Simply test that it is possible for a module to define a pseudo-Optional type without triggering any compiler errors. diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_param.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_param.swift index 38c55f32492..518bc3eff8c 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_param.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_param.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // TODO: Remove @_unsafeNonescapableResult. Instead, the unsafe dependence should be expressed by a builtin that is // hidden within the function body. diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_param_fail.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_param_fail.swift index 896c56d88a6..749e8f811bb 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_param_fail.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_param_fail.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct BV : ~Escapable { let p: UnsafeRawPointer diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope.swift index 4649d5ae763..c1367035fda 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope.swift @@ -6,8 +6,8 @@ // RUN: 2>&1 | %FileCheck %s // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // Test LifetimeDependenceScopeFixup. diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope_fixup.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope_fixup.swift index 230b1a29dee..0c84be23159 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope_fixup.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_scope_fixup.swift @@ -4,8 +4,8 @@ // RUN: | %FileCheck %s // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes struct NCContainer : ~Copyable { let ptr: UnsafeRawBufferPointer diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_todo.swift b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_todo.swift index 012d3cbf0c1..08f28d01cea 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_todo.swift +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_todo.swift @@ -6,11 +6,11 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler // Future tests for LifetimeDependenceDiagnostics. // REQUIRES: disabled +// REQUIRES: swift_feature_NonescapableTypes struct BV : ~Escapable { let p: UnsafeRawPointer diff --git a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_util.sil b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_util.sil index ad4072d7027..cbca7f15998 100644 --- a/test/SILOptimizer/lifetime_dependence/lifetime_dependence_util.sil +++ b/test/SILOptimizer/lifetime_dependence/lifetime_dependence_util.sil @@ -3,8 +3,8 @@ // RUN: -enable-experimental-feature NonescapableTypes \ // RUN: -o /dev/null 2>&1 | %FileCheck %s -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes sil_stage canonical diff --git a/test/SILOptimizer/lifetime_dependence/semantics.swift b/test/SILOptimizer/lifetime_dependence/semantics.swift index 64966d62062..b0f64e97ba0 100644 --- a/test/SILOptimizer/lifetime_dependence/semantics.swift +++ b/test/SILOptimizer/lifetime_dependence/semantics.swift @@ -7,8 +7,8 @@ // RUN: -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_NonescapableTypes // Lifetime dependence semantics by example. diff --git a/test/SILOptimizer/lifetime_dependence/spanofspans.swift b/test/SILOptimizer/lifetime_dependence/spanofspans.swift index 1a6ea8f3b8f..daceba4c0ef 100644 --- a/test/SILOptimizer/lifetime_dependence/spanofspans.swift +++ b/test/SILOptimizer/lifetime_dependence/spanofspans.swift @@ -5,10 +5,10 @@ // RUN: -module-name test \ // RUN: -enable-experimental-feature NonescapableTypes -// REQUIRES: asserts // REQUIRES: swift_in_compiler // REQUIRES: rdar132874319 +// REQUIRES: swift_feature_NonescapableTypes // ([nonescapable] improve diagnostics for spanofspans.swift; prefer an exclusivity violation to a lifetime error) // TODO: uncomment the @lifetime annotations when we have component lifetimes. diff --git a/test/SILOptimizer/moveonly_addresschecker.sil b/test/SILOptimizer/moveonly_addresschecker.sil index c5bcd0b7eea..24ebfd012cf 100644 --- a/test/SILOptimizer/moveonly_addresschecker.sil +++ b/test/SILOptimizer/moveonly_addresschecker.sil @@ -1,5 +1,7 @@ // RUN: %target-sil-opt -module-name moveonly_addresschecker -sil-move-only-address-checker -enable-experimental-feature MoveOnlyClasses -enable-sil-verify-all %s | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyClasses + sil_stage raw import Swift diff --git a/test/SILOptimizer/moveonly_addresschecker.swift b/test/SILOptimizer/moveonly_addresschecker.swift index eb6081786fe..29c750146d4 100644 --- a/test/SILOptimizer/moveonly_addresschecker.swift +++ b/test/SILOptimizer/moveonly_addresschecker.swift @@ -1,6 +1,10 @@ // RUN: %target-swift-emit-sil -sil-verify-all -verify -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses -enable-experimental-feature NonescapableTypes %s -Xllvm -sil-print-final-ossa-module | %FileCheck %s // RUN: %target-swift-emit-sil -O -sil-verify-all -verify -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses -enable-experimental-feature NonescapableTypes %s +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_NoImplicitCopy +// REQUIRES: swift_feature_NonescapableTypes + // This file contains tests that used to crash due to verifier errors. It must // be separate from moveonly_addresschecker_diagnostics since when we fail on // the diagnostics in that file, we do not actually run the verifier. diff --git a/test/SILOptimizer/moveonly_addresschecker_destructure_through_deinit_diagnostics.swift b/test/SILOptimizer/moveonly_addresschecker_destructure_through_deinit_diagnostics.swift index 564da67c81e..5c8b9a2c7e8 100644 --- a/test/SILOptimizer/moveonly_addresschecker_destructure_through_deinit_diagnostics.swift +++ b/test/SILOptimizer/moveonly_addresschecker_destructure_through_deinit_diagnostics.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-emit-sil -sil-verify-all -verify -enable-experimental-feature MoveOnlyClasses -enable-experimental-feature MoveOnlyTuples %s +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_MoveOnlyTuples + // This test validates that we properly emit errors if we partially invalidate // through a type with a deinit. diff --git a/test/SILOptimizer/moveonly_addresschecker_di_interactions.swift b/test/SILOptimizer/moveonly_addresschecker_di_interactions.swift index 04b0af0f760..a98a1c5d8ad 100644 --- a/test/SILOptimizer/moveonly_addresschecker_di_interactions.swift +++ b/test/SILOptimizer/moveonly_addresschecker_di_interactions.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-sil -sil-verify-all -verify -enable-experimental-feature NoImplicitCopy %s +// REQUIRES: swift_feature_NoImplicitCopy + // This testStruct specifically testStructs how DI and the move checkers interact with each other func testStructSimpleNoInit() { diff --git a/test/SILOptimizer/moveonly_addresschecker_diagnostics.sil b/test/SILOptimizer/moveonly_addresschecker_diagnostics.sil index 7884eec42c1..7072a7be13a 100644 --- a/test/SILOptimizer/moveonly_addresschecker_diagnostics.sil +++ b/test/SILOptimizer/moveonly_addresschecker_diagnostics.sil @@ -1,6 +1,8 @@ // RUN: %target-sil-opt -sil-move-only-address-checker -enable-experimental-feature MoveOnlyClasses -enable-sil-verify-all %s -verify // RUN: %target-sil-opt -sil-move-only-address-checker -enable-experimental-feature MoveOnlyClasses -enable-sil-verify-all -move-only-diagnostics-silently-emit-diagnostics %s | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyClasses + // This file contains specific SIL test cases that we expect to emit // diagnostics. These are cases where we want to make it easy to validate // independent of potential changes in the frontend's emission that this diff --git a/test/SILOptimizer/moveonly_addresschecker_diagnostics.swift b/test/SILOptimizer/moveonly_addresschecker_diagnostics.swift index bd7cae4e64a..75a654daee1 100644 --- a/test/SILOptimizer/moveonly_addresschecker_diagnostics.swift +++ b/test/SILOptimizer/moveonly_addresschecker_diagnostics.swift @@ -1,5 +1,9 @@ // RUN: %target-swift-emit-sil %s -O -sil-verify-all -verify -enable-experimental-feature MoveOnlyPartialReinitialization -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_MoveOnlyPartialReinitialization +// REQUIRES: swift_feature_NoImplicitCopy + ////////////////// // Declarations // ////////////////// diff --git a/test/SILOptimizer/moveonly_addresschecker_diagnostics_library_evolution.swift b/test/SILOptimizer/moveonly_addresschecker_diagnostics_library_evolution.swift index 67179129337..affd5afd8d7 100644 --- a/test/SILOptimizer/moveonly_addresschecker_diagnostics_library_evolution.swift +++ b/test/SILOptimizer/moveonly_addresschecker_diagnostics_library_evolution.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-sil -enable-experimental-feature NoImplicitCopy -sil-verify-all -verify -enable-library-evolution %s +// REQUIRES: swift_feature_NoImplicitCopy + // This test is used to validate that we properly handle library evolution code // until we can get all of the normal moveonly_addresschecker_diagnostics test // case to pass. diff --git a/test/SILOptimizer/moveonly_addresschecker_diagnostics_without_partial.swift b/test/SILOptimizer/moveonly_addresschecker_diagnostics_without_partial.swift index 77d584c4624..e58c606a4f6 100644 --- a/test/SILOptimizer/moveonly_addresschecker_diagnostics_without_partial.swift +++ b/test/SILOptimizer/moveonly_addresschecker_diagnostics_without_partial.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-emit-sil -O -sil-verify-all -verify -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses %s +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_NoImplicitCopy + struct Test: ~Copyable { public let baseAddress: UnsafeRawPointer public let count: Int diff --git a/test/SILOptimizer/moveonly_addresschecker_diagnostics_without_partial_reinit.swift b/test/SILOptimizer/moveonly_addresschecker_diagnostics_without_partial_reinit.swift index f53c74c57e5..b94fb2ca7ff 100644 --- a/test/SILOptimizer/moveonly_addresschecker_diagnostics_without_partial_reinit.swift +++ b/test/SILOptimizer/moveonly_addresschecker_diagnostics_without_partial_reinit.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-emit-sil -O -sil-verify-all -verify -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses %s +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_NoImplicitCopy + // Test diagnostics for partial-consumption without partial-reinitialization. struct Ur : ~Copyable { diff --git a/test/SILOptimizer/moveonly_addresschecker_tsan.swift b/test/SILOptimizer/moveonly_addresschecker_tsan.swift index c3e8ac9940f..12e27e12481 100644 --- a/test/SILOptimizer/moveonly_addresschecker_tsan.swift +++ b/test/SILOptimizer/moveonly_addresschecker_tsan.swift @@ -1,6 +1,8 @@ // RUN: %target-swift-emit-sil -sanitize=thread -sil-verify-all -verify -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses %s -Xllvm -sil-print-final-ossa-module | %FileCheck %s // RUN: %target-swift-emit-sil -sanitize=thread -O -sil-verify-all -verify -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses %s // REQUIRES: OS=macosx +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_NoImplicitCopy // This file contains tests that used to crash due to verifier errors. It must // be separate from moveonly_addresschecker_diagnostics since when we fail on diff --git a/test/SILOptimizer/moveonly_addresschecker_unmaximized.sil b/test/SILOptimizer/moveonly_addresschecker_unmaximized.sil index f0df224b92c..9af5a0fe1f2 100644 --- a/test/SILOptimizer/moveonly_addresschecker_unmaximized.sil +++ b/test/SILOptimizer/moveonly_addresschecker_unmaximized.sil @@ -7,6 +7,8 @@ // RUN: -move-only-address-checker-disable-lifetime-extension=true \ // RUN: | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyClasses + import Builtin import Swift diff --git a/test/SILOptimizer/moveonly_addressors.swift b/test/SILOptimizer/moveonly_addressors.swift index ebfe1ddfed9..a6d9ef96a47 100644 --- a/test/SILOptimizer/moveonly_addressors.swift +++ b/test/SILOptimizer/moveonly_addressors.swift @@ -3,8 +3,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature NonescapableTypes -enable-experimental-feature BuiltinModule -parse-stdlib -module-name Swift -DTRIVIAL -emit-sil -verify %s // RUN: %target-swift-frontend -enable-experimental-feature NonescapableTypes -enable-experimental-feature BuiltinModule -parse-stdlib -module-name Swift -DEMPTY -emit-sil -verify %s -// REQUIRES: asserts - +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_NonescapableTypes // TODO: Use the real stdlib types once `UnsafePointer` supports noncopyable // types. diff --git a/test/SILOptimizer/moveonly_borrow_to_destructure_transform.sil b/test/SILOptimizer/moveonly_borrow_to_destructure_transform.sil index 3c024c836cf..15ae0105d0f 100644 --- a/test/SILOptimizer/moveonly_borrow_to_destructure_transform.sil +++ b/test/SILOptimizer/moveonly_borrow_to_destructure_transform.sil @@ -1,5 +1,7 @@ // RUN: %target-sil-opt -enable-experimental-feature MoveOnlyClasses -enable-sil-verify-all -sil-move-only-borrow-to-destructure %s | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyClasses + sil_stage raw import Builtin diff --git a/test/SILOptimizer/moveonly_borrow_to_destructure_transform_diagnostics.sil b/test/SILOptimizer/moveonly_borrow_to_destructure_transform_diagnostics.sil index 8a4d2c4cb29..52fae37147e 100644 --- a/test/SILOptimizer/moveonly_borrow_to_destructure_transform_diagnostics.sil +++ b/test/SILOptimizer/moveonly_borrow_to_destructure_transform_diagnostics.sil @@ -1,6 +1,8 @@ // RUN: %target-sil-opt -move-only-diagnostics-silently-emit-diagnostics -enable-experimental-feature MoveOnlyClasses -enable-sil-verify-all -sil-move-only-borrow-to-destructure %s | %FileCheck %s // RUN: %target-sil-opt -verify -enable-experimental-feature MoveOnlyClasses -enable-sil-verify-all -sil-move-only-borrow-to-destructure %s +// REQUIRES: swift_feature_MoveOnlyClasses + sil_stage raw import Builtin diff --git a/test/SILOptimizer/moveonly_deinit_devirtualization.sil b/test/SILOptimizer/moveonly_deinit_devirtualization.sil index 4bba4006037..03cf32258e1 100644 --- a/test/SILOptimizer/moveonly_deinit_devirtualization.sil +++ b/test/SILOptimizer/moveonly_deinit_devirtualization.sil @@ -1,6 +1,8 @@ // RUN: %target-sil-opt -module-name main -enable-sil-verify-all -deinit-devirtualizer -enable-experimental-feature MoveOnlyClasses -enable-experimental-feature MoveOnlyEnumDeinits %s | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_MoveOnlyEnumDeinits sil_stage raw diff --git a/test/SILOptimizer/moveonly_deinit_devirtualization_library_evolution.sil b/test/SILOptimizer/moveonly_deinit_devirtualization_library_evolution.sil index 4a4f7c848d6..7cd9c87a154 100644 --- a/test/SILOptimizer/moveonly_deinit_devirtualization_library_evolution.sil +++ b/test/SILOptimizer/moveonly_deinit_devirtualization_library_evolution.sil @@ -1,6 +1,8 @@ // RUN: %target-sil-opt -enable-library-evolution -module-name main -enable-sil-verify-all -deinit-devirtualizer -enable-experimental-feature MoveOnlyClasses -enable-experimental-feature MoveOnlyEnumDeinits %s | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_MoveOnlyClasses +// REQUIRES: swift_feature_MoveOnlyEnumDeinits sil_stage raw diff --git a/test/SILOptimizer/moveonly_deinits.swift b/test/SILOptimizer/moveonly_deinits.swift index 2284cc729e8..ebd2118417f 100644 --- a/test/SILOptimizer/moveonly_deinits.swift +++ b/test/SILOptimizer/moveonly_deinits.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-frontend -sil-verify-all -verify -emit-sil -enable-experimental-feature MoveOnlyEnumDeinits -enable-experimental-feature ConsumeSelfInDeinit %s +// REQUIRES: swift_feature_ConsumeSelfInDeinit +// REQUIRES: swift_feature_MoveOnlyEnumDeinits + class Klass {} var globalMoveOnlyStruct = MoveOnlyStruct() diff --git a/test/SILOptimizer/moveonly_discard.swift b/test/SILOptimizer/moveonly_discard.swift index 880234a46ff..ddce2d57373 100644 --- a/test/SILOptimizer/moveonly_discard.swift +++ b/test/SILOptimizer/moveonly_discard.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-frontend -sil-verify-all -verify -emit-sil -enable-experimental-feature MoveOnlyEnumDeinits -enable-experimental-feature ConsumeSelfInDeinit %s +// REQUIRES: swift_feature_ConsumeSelfInDeinit +// REQUIRES: swift_feature_MoveOnlyEnumDeinits + func posix_close(_ t: Int) {} diff --git a/test/SILOptimizer/moveonly_generics_basic.swift b/test/SILOptimizer/moveonly_generics_basic.swift index 78ab46a4276..b894fa88a0e 100644 --- a/test/SILOptimizer/moveonly_generics_basic.swift +++ b/test/SILOptimizer/moveonly_generics_basic.swift @@ -1,7 +1,6 @@ // RUN: %target-swift-frontend %s -sil-verify-all -verify -emit-sil -enable-experimental-feature MoveOnlyPartialReinitialization -// REQUIRES: asserts - +// REQUIRES: swift_feature_MoveOnlyPartialReinitialization /// MARK: types diff --git a/test/SILOptimizer/moveonly_generics_complex.swift b/test/SILOptimizer/moveonly_generics_complex.swift index da507494be3..ac49da39795 100644 --- a/test/SILOptimizer/moveonly_generics_complex.swift +++ b/test/SILOptimizer/moveonly_generics_complex.swift @@ -4,7 +4,7 @@ // RUN: -enable-experimental-feature BuiltinModule \ // RUN: -sil-verify-all -// REQUIRES: asserts +// REQUIRES: swift_feature_BuiltinModule import Builtin diff --git a/test/SILOptimizer/moveonly_lifetime.swift b/test/SILOptimizer/moveonly_lifetime.swift index c553305067c..e7285e4693f 100644 --- a/test/SILOptimizer/moveonly_lifetime.swift +++ b/test/SILOptimizer/moveonly_lifetime.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-sil -sil-verify-all -module-name moveonly_lifetime -o /dev/null -Xllvm -sil-print-canonical-module -Onone -verify -enable-experimental-feature MoveOnlyClasses %s | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyClasses + struct C : ~Copyable { deinit {} } diff --git a/test/SILOptimizer/moveonly_objectchecker.sil b/test/SILOptimizer/moveonly_objectchecker.sil index c91316f06ef..ffd53ae36da 100644 --- a/test/SILOptimizer/moveonly_objectchecker.sil +++ b/test/SILOptimizer/moveonly_objectchecker.sil @@ -1,5 +1,7 @@ // RUN: %target-sil-opt -sil-move-only-object-checker -enable-experimental-feature MoveOnlyClasses -enable-sil-verify-all -move-only-diagnostics-silently-emit-diagnostics %s | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyClasses + sil_stage raw import Swift diff --git a/test/SILOptimizer/moveonly_objectchecker_diagnostics.swift b/test/SILOptimizer/moveonly_objectchecker_diagnostics.swift index f47a814f3ba..e64d67d975f 100644 --- a/test/SILOptimizer/moveonly_objectchecker_diagnostics.swift +++ b/test/SILOptimizer/moveonly_objectchecker_diagnostics.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-sil -sil-verify-all -verify -enable-experimental-feature MoveOnlyClasses %s +// REQUIRES: swift_feature_MoveOnlyClasses + ////////////////// // Declarations // ////////////////// diff --git a/test/SILOptimizer/moveonly_raw_layout.swift b/test/SILOptimizer/moveonly_raw_layout.swift index 5355942fd6e..609514098dc 100644 --- a/test/SILOptimizer/moveonly_raw_layout.swift +++ b/test/SILOptimizer/moveonly_raw_layout.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature BuiltinModule -enable-experimental-feature RawLayout -emit-sil %s | %FileCheck %s +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_RawLayout + import Builtin @_silgen_name("init_lock") diff --git a/test/SILOptimizer/moveonly_trivial_addresschecker_diagnostics.swift b/test/SILOptimizer/moveonly_trivial_addresschecker_diagnostics.swift index ea2321e806c..abb4b8511a1 100644 --- a/test/SILOptimizer/moveonly_trivial_addresschecker_diagnostics.swift +++ b/test/SILOptimizer/moveonly_trivial_addresschecker_diagnostics.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-emit-sil -enable-experimental-feature MoveOnlyPartialReinitialization -sil-verify-all -verify %s +// REQUIRES: swift_feature_MoveOnlyPartialReinitialization + ////////////////// // Declarations // ////////////////// diff --git a/test/SILOptimizer/noimplicitcopy_borrow_to_destructure_transform_diagnostics.sil b/test/SILOptimizer/noimplicitcopy_borrow_to_destructure_transform_diagnostics.sil index c563723b1af..8d977b71727 100644 --- a/test/SILOptimizer/noimplicitcopy_borrow_to_destructure_transform_diagnostics.sil +++ b/test/SILOptimizer/noimplicitcopy_borrow_to_destructure_transform_diagnostics.sil @@ -1,5 +1,7 @@ // RUN: %target-sil-opt -verify -enable-experimental-move-only -enable-experimental-feature MoveOnlyClasses -enable-sil-verify-all -sil-move-only-borrow-to-destructure %s +// REQUIRES: swift_feature_MoveOnlyClasses + sil_stage raw import Builtin diff --git a/test/SILOptimizer/performance-annotations.swift b/test/SILOptimizer/performance-annotations.swift index 45d0fbcda2e..00ff527e163 100644 --- a/test/SILOptimizer/performance-annotations.swift +++ b/test/SILOptimizer/performance-annotations.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib +// REQUIRES: swift_feature_RawLayout protocol P { func protoMethod(_ a: Int) -> Int diff --git a/test/SILOptimizer/pre_specialize_layouts.swift b/test/SILOptimizer/pre_specialize_layouts.swift index 61acf9dd9ac..310aaa7ed15 100644 --- a/test/SILOptimizer/pre_specialize_layouts.swift +++ b/test/SILOptimizer/pre_specialize_layouts.swift @@ -16,6 +16,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature LayoutPrespecialization -O -swift-version 5 -enable-library-evolution -emit-module -o /dev/null -emit-module-interface-path %t/pre_specialized_module_layouts.swiftinterface %S/Inputs/pre_specialized_module_layouts.swift -module-name pre_specialized_module_layouts // RUN: %target-swift-frontend -enable-experimental-feature LayoutPrespecialization -I %t -O -Xllvm -sil-disable-pass=function-signature-opts -emit-sil %s | %FileCheck %s --check-prefix=OPT +// REQUIRES: swift_feature_LayoutPrespecialization + import pre_specialized_module_layouts // Helper to prevent return values from getting optimized away diff --git a/test/SILOptimizer/reference_bindings.swift b/test/SILOptimizer/reference_bindings.swift index fdfd982e1c2..276abf5ba16 100644 --- a/test/SILOptimizer/reference_bindings.swift +++ b/test/SILOptimizer/reference_bindings.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -verify -sil-verify-all -enable-experimental-feature ReferenceBindings -emit-sil %s +// REQUIRES: swift_feature_ReferenceBindings + func varBindingTest() { var x = "1" x = "1" diff --git a/test/SILOptimizer/sil_combine.sil b/test/SILOptimizer/sil_combine.sil index 33f4fc308a6..5807b021215 100644 --- a/test/SILOptimizer/sil_combine.sil +++ b/test/SILOptimizer/sil_combine.sil @@ -1,6 +1,7 @@ // RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -sil-combine -enable-experimental-feature ValueGenerics | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_ValueGenerics // Declare this SIL to be canonical because some tests break raw SIL // conventions. e.g. address-type block args. -enforce-exclusivity=none is also diff --git a/test/SILOptimizer/sil_combine_moveonly.sil b/test/SILOptimizer/sil_combine_moveonly.sil index 4e0f5262225..bcddd137a93 100644 --- a/test/SILOptimizer/sil_combine_moveonly.sil +++ b/test/SILOptimizer/sil_combine_moveonly.sil @@ -1,5 +1,7 @@ // RUN: %target-sil-opt -enable-experimental-feature MoveOnlyEnumDeinits -enable-sil-verify-all -sil-combine %s | %FileCheck %s +// REQUIRES: swift_feature_MoveOnlyEnumDeinits + sil_stage canonical import Builtin diff --git a/test/SILOptimizer/simplify_release_value.sil b/test/SILOptimizer/simplify_release_value.sil index fbba4d60289..5fcf2d016ba 100644 --- a/test/SILOptimizer/simplify_release_value.sil +++ b/test/SILOptimizer/simplify_release_value.sil @@ -1,6 +1,7 @@ // RUN: %target-sil-opt -enable-experimental-feature MoveOnlyEnumDeinits -enable-sil-verify-all %s -simplification -simplify-instruction=release_value | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_MoveOnlyEnumDeinits import Swift import Builtin diff --git a/test/SILOptimizer/simplify_retain_value.sil b/test/SILOptimizer/simplify_retain_value.sil index f345448f85d..501066a5927 100644 --- a/test/SILOptimizer/simplify_retain_value.sil +++ b/test/SILOptimizer/simplify_retain_value.sil @@ -1,6 +1,7 @@ // RUN: %target-sil-opt -enable-experimental-feature MoveOnlyEnumDeinits -enable-sil-verify-all %s -simplification -simplify-instruction=retain_value | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_MoveOnlyEnumDeinits import Swift import Builtin diff --git a/test/SILOptimizer/stdlib/Cell.swift b/test/SILOptimizer/stdlib/Cell.swift index d31e1ddb839..cbe1323049a 100644 --- a/test/SILOptimizer/stdlib/Cell.swift +++ b/test/SILOptimizer/stdlib/Cell.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -O -emit-sil -disable-availability-checking %s -enable-builtin-module -enable-experimental-feature RawLayout | %FileCheck %s +// REQUIRES: swift_feature_RawLayout + import Builtin @frozen diff --git a/test/SILOptimizer/tuple-conformances.swift b/test/SILOptimizer/tuple-conformances.swift index 147ed28fcb8..300f9697217 100644 --- a/test/SILOptimizer/tuple-conformances.swift +++ b/test/SILOptimizer/tuple-conformances.swift @@ -1,7 +1,6 @@ // RUN: %target-swift-frontend -emit-sil %s -enable-experimental-feature TupleConformances | %FileCheck %s -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_TupleConformances public typealias Tuple = (repeat each T) diff --git a/test/Sema/access-level-and-non-resilient-import.swift b/test/Sema/access-level-and-non-resilient-import.swift index d769a09898e..8036c12957b 100644 --- a/test/Sema/access-level-and-non-resilient-import.swift +++ b/test/Sema/access-level-and-non-resilient-import.swift @@ -32,6 +32,9 @@ // RUN: -enable-upcoming-feature InternalImportsByDefault \ // RUN: -package-name pkg +// REQUIRES: swift_feature_AccessLevelOnImport +// REQUIRES: swift_feature_InternalImportsByDefault + //--- DefaultLib.swift //--- PublicLib.swift //--- PackageLib.swift diff --git a/test/Sema/access-level-import-classic-exportability.swift b/test/Sema/access-level-import-classic-exportability.swift index b08b900cb0e..4720bc8f6f9 100644 --- a/test/Sema/access-level-import-classic-exportability.swift +++ b/test/Sema/access-level-import-classic-exportability.swift @@ -24,6 +24,8 @@ // RUN: -enable-library-evolution \ // RUN: -enable-experimental-feature AccessLevelOnImport -verify +// REQUIRES: swift_feature_AccessLevelOnImport + //--- PublicLib.swift public struct PublicImportType { public init() {} diff --git a/test/Sema/access-level-import-flag-check.swift b/test/Sema/access-level-import-flag-check.swift index 129b6436693..11191d0fdd1 100644 --- a/test/Sema/access-level-import-flag-check.swift +++ b/test/Sema/access-level-import-flag-check.swift @@ -23,6 +23,8 @@ /// swiftinterfaces don't need the flag. // RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface) -I %t +// REQUIRES: swift_feature_InternalImportsByDefault + //--- PublicLib.swift //--- PackageLib.swift //--- InternalLib.swift diff --git a/test/Sema/access-level-import-inconsistencies.swift b/test/Sema/access-level-import-inconsistencies.swift index 671babdf558..a9b642f70f5 100644 --- a/test/Sema/access-level-import-inconsistencies.swift +++ b/test/Sema/access-level-import-inconsistencies.swift @@ -83,6 +83,8 @@ public import Lib // expected-warning {{public import of 'Lib' was not used in p // RUN: %target-swift-frontend -typecheck -I %t \ // RUN %t/GeneratedAssetSymbols.swift \ // RUN: -primary-file %t/UserWrittenFile.swift -verify + +// REQUIRES: swift_feature_InternalImportsByDefault //--- UserWrittenFile.swift internal import Lib //--- GeneratedAssetSymbols.swift diff --git a/test/Sema/access-level-import-inconsistent-same-file.swift b/test/Sema/access-level-import-inconsistent-same-file.swift index 8fdf0d84dbc..d9aca723dee 100644 --- a/test/Sema/access-level-import-inconsistent-same-file.swift +++ b/test/Sema/access-level-import-inconsistent-same-file.swift @@ -19,6 +19,8 @@ // RUN: %target-swift-frontend -typecheck -verify %t/Client_Swift5.swift -I %t \ // RUN: -swift-version 5 +// REQUIRES: swift_feature_InternalImportsByDefault + //--- Lib.swift public struct Type1 {} diff --git a/test/Sema/access-level-import-typealias.swift b/test/Sema/access-level-import-typealias.swift index c5934439a1d..d13f0b50f46 100644 --- a/test/Sema/access-level-import-typealias.swift +++ b/test/Sema/access-level-import-typealias.swift @@ -13,6 +13,8 @@ // RUN: -swift-version 5 -enable-library-evolution \ // RUN: -enable-upcoming-feature InternalImportsByDefault +// REQUIRES: swift_feature_InternalImportsByDefault + //--- Original.swift open class Clazz {} diff --git a/test/Sema/authoritative-import-priority.swift b/test/Sema/authoritative-import-priority.swift index 7cc6972b160..f91945aa3f1 100644 --- a/test/Sema/authoritative-import-priority.swift +++ b/test/Sema/authoritative-import-priority.swift @@ -34,6 +34,8 @@ // RUN: -enable-upcoming-feature InternalImportsByDefault \ // RUN: -Rmodule-api-import -verify +// REQUIRES: swift_feature_InternalImportsByDefault + //--- module.modulemap module FarClangDep { header "FarClangDep.h" diff --git a/test/Sema/availability_define.swift b/test/Sema/availability_define.swift index 625e112de05..88b382cbc5e 100644 --- a/test/Sema/availability_define.swift +++ b/test/Sema/availability_define.swift @@ -15,6 +15,7 @@ // RUN: -enable-experimental-feature AvailabilityMacro="_myProject 2.5:macOS 52.5" // REQUIRES: OS=macosx +// REQUIRES: swift_feature_AvailabilityMacro @available(_iOS53Aligned, *) public func onMacOS50() {} diff --git a/test/Sema/bitwise_copyable.swift b/test/Sema/bitwise_copyable.swift index 6d5672539bb..8fdd0bd53ae 100644 --- a/test/Sema/bitwise_copyable.swift +++ b/test/Sema/bitwise_copyable.swift @@ -5,6 +5,9 @@ // RUN: -enable-builtin-module \ // RUN: -debug-diagnostic-names +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_Sensitive + //============================================================================== //===========================DEPENDENCY-FREE TESTS=(BEGIN)===================={{ //============================================================================== diff --git a/test/Sema/bitwise_copyable_2.swift b/test/Sema/bitwise_copyable_2.swift index b55eaebeaf0..754cba77211 100644 --- a/test/Sema/bitwise_copyable_2.swift +++ b/test/Sema/bitwise_copyable_2.swift @@ -3,6 +3,8 @@ // RUN: -enable-builtin-module \ // RUN: -debug-diagnostic-names +// REQUIRES: swift_feature_NonescapableTypes + // This test file only exists in order to test without noncopyable_generics and can be deleted once that is always enabled. @_nonescapable diff --git a/test/Sema/bitwse_copyable_import.swift b/test/Sema/bitwse_copyable_import.swift index 05214fc36ae..326da46aebb 100644 --- a/test/Sema/bitwse_copyable_import.swift +++ b/test/Sema/bitwse_copyable_import.swift @@ -9,6 +9,8 @@ // RUN: -debug-diagnostic-names \ // RUN: -import-objc-header %t/Library.h +// REQUIRES: swift_feature_NonescapableTypes + //--- Library.h struct Tenple { diff --git a/test/Sema/builtin_int.swift b/test/Sema/builtin_int.swift index cf409c2dd23..b2f542f6d14 100644 --- a/test/Sema/builtin_int.swift +++ b/test/Sema/builtin_int.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-frontend -disable-experimental-parser-round-trip -enable-experimental-feature ValueGenerics -enable-experimental-feature BuiltinModule -typecheck -verify %s +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_ValueGenerics + import Builtin func a(x: Builtin.Int<64>) -> Builtin.Int64 { diff --git a/test/Sema/builtin_vector.swift b/test/Sema/builtin_vector.swift index 2db1d8795c7..1d8765a0826 100644 --- a/test/Sema/builtin_vector.swift +++ b/test/Sema/builtin_vector.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-frontend -disable-experimental-parser-round-trip -disable-availability-checking -enable-experimental-feature ValueGenerics -enable-experimental-feature BuiltinModule -typecheck -verify %s +// REQUIRES: swift_feature_BuiltinModule +// REQUIRES: swift_feature_ValueGenerics + import Builtin func a(x: Builtin.FixedArray) -> Builtin.FixedArray { diff --git a/test/Sema/copy_expr.swift b/test/Sema/copy_expr.swift index 43dfe8312b9..d5004e3270d 100644 --- a/test/Sema/copy_expr.swift +++ b/test/Sema/copy_expr.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature NoImplicitCopy +// REQUIRES: swift_feature_NoImplicitCopy + class Klass { var k: Klass? = nil } diff --git a/test/Sema/copy_expr_noimplicit_copy.swift b/test/Sema/copy_expr_noimplicit_copy.swift index ea906adfabd..80f4fe1d4cb 100644 --- a/test/Sema/copy_expr_noimplicit_copy.swift +++ b/test/Sema/copy_expr_noimplicit_copy.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature NoImplicitCopy +// REQUIRES: swift_feature_NoImplicitCopy + class Klass {} func consumeKlass(_ x: __owned Klass) {} diff --git a/test/Sema/coroutine_accessors.swift b/test/Sema/coroutine_accessors.swift index d1034ef2283..ca7c8cd57f0 100644 --- a/test/Sema/coroutine_accessors.swift +++ b/test/Sema/coroutine_accessors.swift @@ -3,6 +3,8 @@ // RUN: -enable-experimental-feature CoroutineAccessors \ // RUN: -debug-diagnostic-names +// REQUIRES: swift_feature_CoroutineAccessors + struct S { var i: Int diff --git a/test/Sema/diag_mismatched_magic_literals_swift6.swift b/test/Sema/diag_mismatched_magic_literals_swift6.swift index 681f1377e3f..5c6d345a639 100644 --- a/test/Sema/diag_mismatched_magic_literals_swift6.swift +++ b/test/Sema/diag_mismatched_magic_literals_swift6.swift @@ -5,6 +5,8 @@ // And is also available in Swift 6 mode on asserts compilers. // RUN: %target-typecheck-verify-swift -swift-version 6 +// REQUIRES: swift_feature_ConciseMagicFile + func callee(file: String = #file) {} // expected-note {{'file' declared here}} func callee(fileID: String = #fileID) {} // expected-note {{'fileID' declared here}} func callee(filePath: String = #filePath) {} // expected-note 2 {{'filePath' declared here}} diff --git a/test/Sema/discard.swift b/test/Sema/discard.swift index 07646f04c01..62cc50ce9db 100644 --- a/test/Sema/discard.swift +++ b/test/Sema/discard.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature MoveOnlyEnumDeinits +// REQUIRES: swift_feature_MoveOnlyEnumDeinits + // Typechecking for the discard statement. func discard() -> Int {} diff --git a/test/Sema/exhaustive_switch.swift b/test/Sema/exhaustive_switch.swift index eb39db74dd1..a25092d1e0f 100644 --- a/test/Sema/exhaustive_switch.swift +++ b/test/Sema/exhaustive_switch.swift @@ -4,6 +4,8 @@ // RUN: %target-typecheck-verify-swift -swift-version 4 -enable-library-evolution -enable-nonfrozen-enum-exhaustivity-diagnostics -I %t // RUN: %target-typecheck-verify-swift -swift-version 4 -enable-library-evolution -enable-upcoming-feature NonfrozenEnumExhaustivity -I %t +// REQUIRES: swift_feature_NonfrozenEnumExhaustivity + import exhaustive_switch_testable_helper func foo(a: Int?, b: Int?) -> Int { diff --git a/test/Sema/immutability_overload_async.swift b/test/Sema/immutability_overload_async.swift index d145548de18..959156ec136 100644 --- a/test/Sema/immutability_overload_async.swift +++ b/test/Sema/immutability_overload_async.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_RegionBasedIsolation protocol Iterator { associatedtype Failure: Error diff --git a/test/Sema/implementation-only-deprecated.swift b/test/Sema/implementation-only-deprecated.swift index 79d90aa88e2..e60d58c3eef 100644 --- a/test/Sema/implementation-only-deprecated.swift +++ b/test/Sema/implementation-only-deprecated.swift @@ -12,6 +12,8 @@ // RUN: -enable-upcoming-feature InternalImportsByDefault \ // RUN: -verify +// REQUIRES: swift_feature_InternalImportsByDefault + //--- Lib.swift public struct SomeType {} diff --git a/test/Sema/implicit_last_expr.swift b/test/Sema/implicit_last_expr.swift index 6b68dd99360..db0ffbd84e3 100644 --- a/test/Sema/implicit_last_expr.swift +++ b/test/Sema/implicit_last_expr.swift @@ -1,7 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ImplicitLastExprResults -disable-availability-checking -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitLastExprResults let a = if .random() { print("hello") diff --git a/test/Sema/implicit_last_expr_exec.swift b/test/Sema/implicit_last_expr_exec.swift index 91d688a2265..dfeabac123f 100644 --- a/test/Sema/implicit_last_expr_exec.swift +++ b/test/Sema/implicit_last_expr_exec.swift @@ -4,9 +4,7 @@ // RUN: %target-run %t/a.out | %FileCheck %s // REQUIRES: executable_test - -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitLastExprResults func testBinding(_ cond: Bool) -> Int { let x = if cond { diff --git a/test/Sema/implicit_lifetime_dependence.swift b/test/Sema/implicit_lifetime_dependence.swift index ddd2488ea93..26b4c923301 100644 --- a/test/Sema/implicit_lifetime_dependence.swift +++ b/test/Sema/implicit_lifetime_dependence.swift @@ -1,6 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature NonescapableTypes -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751). -// REQUIRES: asserts + +// REQUIRES: swift_feature_NonescapableTypes struct BufferView : ~Escapable, ~Copyable { let ptr: UnsafeRawBufferPointer? diff --git a/test/Sema/lifetime_attr.swift b/test/Sema/lifetime_attr.swift index 4762e7a7601..74e3c9fc89e 100644 --- a/test/Sema/lifetime_attr.swift +++ b/test/Sema/lifetime_attr.swift @@ -1,6 +1,7 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature NonescapableTypes -disable-experimental-parser-round-trip // FIXME: Remove '-disable-experimental-parser-round-trip'. -// REQUIRES: asserts + +// REQUIRES: swift_feature_NonescapableTypes struct NE : ~Escapable { @lifetime(self) // expected-error{{invalid lifetime dependence on self in an initializer}} diff --git a/test/Sema/lifetime_dependence_functype.swift b/test/Sema/lifetime_dependence_functype.swift index b44a117d0dc..98f88dbd173 100644 --- a/test/Sema/lifetime_dependence_functype.swift +++ b/test/Sema/lifetime_dependence_functype.swift @@ -1,5 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature NonescapableTypes -// REQUIRES: asserts + +// REQUIRES: swift_feature_NonescapableTypes struct NC: ~Copyable { var ne: NE { diff --git a/test/Sema/move_expr.swift b/test/Sema/move_expr.swift index e02265df535..b0cc2cf6a98 100644 --- a/test/Sema/move_expr.swift +++ b/test/Sema/move_expr.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature NoImplicitCopy +// REQUIRES: swift_feature_NoImplicitCopy + class Klass { var k: Klass? = nil } diff --git a/test/Sema/move_expr_moveonly_partial_consumption.swift b/test/Sema/move_expr_moveonly_partial_consumption.swift index e6856f57fa5..b9433a24d00 100644 --- a/test/Sema/move_expr_moveonly_partial_consumption.swift +++ b/test/Sema/move_expr_moveonly_partial_consumption.swift @@ -3,6 +3,8 @@ // RUN: -enable-experimental-feature NoImplicitCopy \ // RUN: -debug-diagnostic-names +// REQUIRES: swift_feature_NoImplicitCopy + @_silgen_name("get") func get(_ t: T.Type = T.self) -> T diff --git a/test/Sema/moveonly_objc_enum.swift b/test/Sema/moveonly_objc_enum.swift index 87bfecd7f3f..6b27eb92748 100644 --- a/test/Sema/moveonly_objc_enum.swift +++ b/test/Sema/moveonly_objc_enum.swift @@ -1,6 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature MoveOnlyEnumDeinits // REQUIRES: objc_interop +// REQUIRES: swift_feature_MoveOnlyEnumDeinits // Validate that we can't mark an objc enum as move only. diff --git a/test/Sema/moveonly_restrictions.swift b/test/Sema/moveonly_restrictions.swift index c33e82b2ab7..98b6a14d679 100644 --- a/test/Sema/moveonly_restrictions.swift +++ b/test/Sema/moveonly_restrictions.swift @@ -1,6 +1,7 @@ // RUN: %target-typecheck-verify-swift -target %target-swift-5.1-abi-triple -enable-experimental-feature MoveOnlyClasses // REQUIRES: concurrency +// REQUIRES: swift_feature_MoveOnlyClasses class CopyableKlass {} diff --git a/test/Sema/raw_layout.swift b/test/Sema/raw_layout.swift index fb1cdf0f538..a0a4f5a1334 100644 --- a/test/Sema/raw_layout.swift +++ b/test/Sema/raw_layout.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature RawLayout -typecheck -verify %s +// REQUIRES: swift_feature_RawLayout + @_rawLayout(size: 4, alignment: 4) // expected-error{{type with @_rawLayout cannot be copied and must be declared ~Copyable}} struct ImproperlyCopyable {} diff --git a/test/Sema/raw_layout_correct.swift b/test/Sema/raw_layout_correct.swift index c4512819fc4..0220a444bcc 100644 --- a/test/Sema/raw_layout_correct.swift +++ b/test/Sema/raw_layout_correct.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature RawLayout -typecheck -verify %s +// REQUIRES: swift_feature_RawLayout + @_rawLayout(like: T) struct RawStorage: ~Copyable {} diff --git a/test/Sema/raw_layout_parse.swift b/test/Sema/raw_layout_parse.swift index bbe974fb9f6..a604b5ad47a 100644 --- a/test/Sema/raw_layout_parse.swift +++ b/test/Sema/raw_layout_parse.swift @@ -1,5 +1,7 @@ // RUN: %target-swift-frontend -enable-experimental-feature RawLayout -parse -verify %s +// REQUIRES: swift_feature_RawLayout + @_rawLayout(size: 4, alignment: 4) struct Lock: ~Copyable {} diff --git a/test/Sema/raw_layout_sendable.swift b/test/Sema/raw_layout_sendable.swift index 67a4872cf50..b596111e09c 100644 --- a/test/Sema/raw_layout_sendable.swift +++ b/test/Sema/raw_layout_sendable.swift @@ -1,5 +1,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature StrictConcurrency -enable-experimental-feature RawLayout -typecheck -verify %s +// REQUIRES: swift_feature_RawLayout +// REQUIRES: swift_feature_StrictConcurrency + func checkSendable(_: @Sendable () -> ()) {} @_rawLayout(size: 4, alignment: 4) diff --git a/test/Sema/read_requirements.swift b/test/Sema/read_requirements.swift index 65a81f8334e..eb44a0a3a13 100644 --- a/test/Sema/read_requirements.swift +++ b/test/Sema/read_requirements.swift @@ -3,6 +3,8 @@ // RUN: -enable-experimental-feature CoroutineAccessors \ // RUN: -debug-diagnostic-names +// REQUIRES: swift_feature_CoroutineAccessors + // A read requirement may be satisfied by // - a stored property // - a _read accessor diff --git a/test/Sema/reference_bindings.swift b/test/Sema/reference_bindings.swift index 96b980a1055..cdb88bf7d32 100644 --- a/test/Sema/reference_bindings.swift +++ b/test/Sema/reference_bindings.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ReferenceBindings +// REQUIRES: swift_feature_ReferenceBindings + var globalValue = String() class Klass { var sStored: String = "" diff --git a/test/Sema/report-public-import-of-private-module.swift b/test/Sema/report-public-import-of-private-module.swift index 3a0dc070868..d1e31e4dd36 100644 --- a/test/Sema/report-public-import-of-private-module.swift +++ b/test/Sema/report-public-import-of-private-module.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: split-file %s %t // REQUIRES: VENDOR=apple +// REQUIRES: swift_feature_InternalImportsByDefault /// Prepare the SDK. // RUN: cp -r %S/Inputs/public-private-sdk %t/sdk diff --git a/test/Sema/sending.swift b/test/Sema/sending.swift index eb300121de2..a9718e63734 100644 --- a/test/Sema/sending.swift +++ b/test/Sema/sending.swift @@ -1,7 +1,8 @@ // RUN: %target-typecheck-verify-swift -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -enable-experimental-feature SendingArgsAndResults -// REQUIRES: asserts // REQUIRES: concurrency +// REQUIRES: swift_feature_RegionBasedIsolation +// REQUIRES: swift_feature_SendingArgsAndResults // README: This test makes sure that we error when sending is placed in the // wrong place with respect to ownership modifiers. diff --git a/test/Sema/superfluously-public-imports.swift b/test/Sema/superfluously-public-imports.swift index b6e7f137c47..e453a245ee1 100644 --- a/test/Sema/superfluously-public-imports.swift +++ b/test/Sema/superfluously-public-imports.swift @@ -35,6 +35,8 @@ // RUN: %target-swift-frontend -typecheck %t/Client_Swift5.swift -I %t \ // RUN: -swift-version 5 -verify +// REQUIRES: swift_feature_InternalImportsByDefault + //--- DepUsedFromInlinableCode.swift public struct TypeUsedFromInlinableCode {} public func funcUsedFromInlinableCode() {} diff --git a/test/Sema/type_eraser_experimental_flag.swift b/test/Sema/type_eraser_experimental_flag.swift index c81c3a084e2..c25a025c589 100644 --- a/test/Sema/type_eraser_experimental_flag.swift +++ b/test/Sema/type_eraser_experimental_flag.swift @@ -38,6 +38,8 @@ public struct ConcreteP: P, Hashable { // CHECK-INTERFACE2: swift-module-flags:{{.*}} -enable-experimental-feature OpaqueTypeErasure // RUN: %target-swift-frontend -disable-availability-checking -I %t/test2/ -emit-sil %S/Inputs/import_with_opaque_type_erasure.swift | %FileCheck %s --check-prefix CHECK-UNDERLYING-TYPE2 + +// REQUIRES: swift_feature_OpaqueTypeErasure // CHECK-UNDERLYING-TYPE2-LABEL: s31import_with_opaque_type_erasure6erasedQrvg // CHECK-UNDERLYING-TYPE2: bb0(%0 : $*AnyP): // CHECK-UNDERLYING-TYPE2: function_ref @$s7erasure14testTypeErasedQryF : $@convention(thin) @substituted <τ_0_0> () -> @out τ_0_0 for diff --git a/test/Sema/value_generics.swift b/test/Sema/value_generics.swift index 231b86d81f6..0850c320c7e 100644 --- a/test/Sema/value_generics.swift +++ b/test/Sema/value_generics.swift @@ -1,5 +1,8 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ValueGenerics -enable-experimental-feature NonescapableTypes -disable-availability-checking -disable-experimental-parser-round-trip +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_ValueGenerics + protocol P {} func invalid() {} // expected-error {{value generic 'N' must have an explicit value type declared}} diff --git a/test/Sema/value_generics_availability.swift b/test/Sema/value_generics_availability.swift index 54f184ed28f..97de70a126c 100644 --- a/test/Sema/value_generics_availability.swift +++ b/test/Sema/value_generics_availability.swift @@ -1,6 +1,8 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature ValueGenerics -enable-experimental-feature NonescapableTypes // REQUIRES: OS=macosx +// REQUIRES: swift_feature_NonescapableTypes +// REQUIRES: swift_feature_ValueGenerics struct A {} // expected-error {{values in generic types are only available in macOS 99.99.0 or newer}} // expected-note@-1 {{add @available attribute to enclosing generic struct}} diff --git a/test/Serialization/attr-extern.swift b/test/Serialization/attr-extern.swift index 97741ee9efc..37693ff027e 100644 --- a/test/Serialization/attr-extern.swift +++ b/test/Serialization/attr-extern.swift @@ -3,6 +3,8 @@ // RUN: llvm-bcanalyzer -dump %t/a.swiftmodule | %FileCheck --check-prefix BC-CHECK --implicit-check-not UnknownCode %s // RUN: %target-swift-ide-test -print-module -module-to-print a -source-filename x -I %t | %FileCheck --check-prefix MODULE-CHECK %s +// REQUIRES: swift_feature_Extern + // BC-CHECK: { diff --git a/test/Serialization/raw_layout.swift b/test/Serialization/raw_layout.swift index 074e684280c..065bdde6027 100644 --- a/test/Serialization/raw_layout.swift +++ b/test/Serialization/raw_layout.swift @@ -2,6 +2,8 @@ // RUN: %target-swift-frontend -emit-module -enable-experimental-feature RawLayout -module-name raw_layout_fred -o %t %S/Inputs/raw_layout.swift // RUN: %target-swift-frontend -I %t -I %S/Inputs -cxx-interoperability-mode=upcoming-swift -emit-ir %s -verify | %FileCheck %s +// REQUIRES: swift_feature_RawLayout + import raw_layout_fred import RawLayoutCXX diff --git a/test/Serialization/value_generics.swift b/test/Serialization/value_generics.swift index cf4a6132e61..01fedda878d 100644 --- a/test/Serialization/value_generics.swift +++ b/test/Serialization/value_generics.swift @@ -2,6 +2,9 @@ // RUN: %target-swift-frontend %s -emit-module -enable-experimental-feature ValueGenerics -enable-experimental-feature RawLayout -disable-availability-checking -disable-experimental-parser-round-trip -parse-as-library -o %t // RUN: %target-sil-opt -enable-sil-verify-all %t/value_generics.swiftmodule -o - | %FileCheck %s +// REQUIRES: swift_feature_RawLayout +// REQUIRES: swift_feature_ValueGenerics + // CHECK: @_rawLayout(likeArrayOf: Element, count: Count) struct Vector : ~Copyable where Element : ~Copyable { @_rawLayout(likeArrayOf: Element, count: Count) struct Vector: ~Copyable {} diff --git a/test/SourceKit/Diagnostics/embedded_non_wmo.swift b/test/SourceKit/Diagnostics/embedded_non_wmo.swift index b45561434a0..8059b06a8cc 100644 --- a/test/SourceKit/Diagnostics/embedded_non_wmo.swift +++ b/test/SourceKit/Diagnostics/embedded_non_wmo.swift @@ -8,6 +8,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: embedded_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded //--- file1.swift diff --git a/test/SourceKit/DocSupport/doc_objc_concurrency.swift b/test/SourceKit/DocSupport/doc_objc_concurrency.swift index ccdb921da47..da5d4d22692 100644 --- a/test/SourceKit/DocSupport/doc_objc_concurrency.swift +++ b/test/SourceKit/DocSupport/doc_objc_concurrency.swift @@ -1,6 +1,6 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers // RUN: %empty-directory(%t) diff --git a/test/SourceKit/InterfaceGen/gen_objc_concurrency.swift b/test/SourceKit/InterfaceGen/gen_objc_concurrency.swift index a61e05c75a3..ea72ef94d2f 100644 --- a/test/SourceKit/InterfaceGen/gen_objc_concurrency.swift +++ b/test/SourceKit/InterfaceGen/gen_objc_concurrency.swift @@ -1,6 +1,6 @@ // REQUIRES: objc_interop // REQUIRES: concurrency -// REQUIRES: asserts +// REQUIRES: swift_feature_SendableCompletionHandlers // RUN: %empty-directory(%t) diff --git a/test/SourceKit/Macros/macro_basic.swift b/test/SourceKit/Macros/macro_basic.swift index d90a4fd7802..8ddc31e5cf8 100644 --- a/test/SourceKit/Macros/macro_basic.swift +++ b/test/SourceKit/Macros/macro_basic.swift @@ -122,6 +122,7 @@ func remoteCall(function: String, arguments: [String } // REQUIRES: swift_swift_parser, executable_test, shell, asserts +// REQUIRES: swift_feature_PreambleMacros // RUN: %empty-directory(%t) diff --git a/test/SourceKit/Misc/embedded_no_wmo.swift b/test/SourceKit/Misc/embedded_no_wmo.swift index fef0a49cce2..4a8193f826c 100644 --- a/test/SourceKit/Misc/embedded_no_wmo.swift +++ b/test/SourceKit/Misc/embedded_no_wmo.swift @@ -18,6 +18,7 @@ final public class X { // REQUIRES: swift_in_compiler // REQUIRES: embedded_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded // check that SourceKit does not crash on this diff --git a/test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/Macros.swift b/test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/Macros.swift index c141f7a9c87..79885c3d206 100644 --- a/test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/Macros.swift +++ b/test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/Macros.swift @@ -1,5 +1,5 @@ -// '-enable-experimental-feature Macros' requires an asserts build. -// REQUIRES: swift_swift_parser, asserts +// REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_Macros // RUN: %empty-directory(%t) // RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/stringify_macro.swift -g -no-toolchain-stdlib-rpath -swift-version 5 diff --git a/test/TBD/objc-entry-point.swift b/test/TBD/objc-entry-point.swift index adb1d062180..4ad97124a08 100644 --- a/test/TBD/objc-entry-point.swift +++ b/test/TBD/objc-entry-point.swift @@ -5,6 +5,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-upcoming-feature DeprecateApplicationMain -emit-ir -o /dev/null -validate-tbd-against-ir=all -parse-as-library -verify -verify-additional-prefix deprecated- %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import AppKit // Globals in non-script mode files that still have entry points diff --git a/test/Unsafe/interface_printing.swift b/test/Unsafe/interface_printing.swift index a2255be358e..bdba9316926 100644 --- a/test/Unsafe/interface_printing.swift +++ b/test/Unsafe/interface_printing.swift @@ -2,6 +2,8 @@ // RUN: %target-swift-frontend -swift-version 5 -enable-library-evolution -module-name unsafe -emit-module -o %t/unsafe.swiftmodule -emit-module-interface-path - %s -enable-experimental-feature AllowUnsafeAttribute | %FileCheck %s +// REQUIRES: swift_feature_AllowUnsafeAttribute + // CHECK: #if compiler(>=5.3) && $AllowUnsafeAttribute // CHECK: @unsafe public func testFunction() // CHECK: #else diff --git a/test/Unsafe/unsafe.swift b/test/Unsafe/unsafe.swift index bc6df9e218d..71e8328420c 100644 --- a/test/Unsafe/unsafe.swift +++ b/test/Unsafe/unsafe.swift @@ -6,6 +6,9 @@ // Make sure everything compiles without error when unsafe code is allowed. // RUN: %target-swift-frontend -typecheck -enable-experimental-feature AllowUnsafeAttribute %s -I %t +// REQUIRES: swift_feature_AllowUnsafeAttribute +// REQUIRES: swift_feature_WarnUnsafe + import unsafe_swift_decls // ----------------------------------------------------------------------- diff --git a/test/Unsafe/unsafe_concurrency.swift b/test/Unsafe/unsafe_concurrency.swift index 9d43ff670eb..0346ad469d4 100644 --- a/test/Unsafe/unsafe_concurrency.swift +++ b/test/Unsafe/unsafe_concurrency.swift @@ -1,6 +1,9 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature AllowUnsafeAttribute -enable-experimental-feature WarnUnsafe -enable-experimental-feature StrictConcurrency // REQUIRES: concurrency +// REQUIRES: swift_feature_AllowUnsafeAttribute +// REQUIRES: swift_feature_StrictConcurrency +// REQUIRES: swift_feature_WarnUnsafe // expected-warning@+1{{@unchecked conformance involves unsafe code}} class C: @unchecked Sendable { diff --git a/test/Unsafe/unsafe_imports.swift b/test/Unsafe/unsafe_imports.swift index be34cdee86b..0b80943f303 100644 --- a/test/Unsafe/unsafe_imports.swift +++ b/test/Unsafe/unsafe_imports.swift @@ -1,5 +1,8 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature AllowUnsafeAttribute -enable-experimental-feature WarnUnsafe -I %S/Inputs +// REQUIRES: swift_feature_AllowUnsafeAttribute +// REQUIRES: swift_feature_WarnUnsafe + import unsafe_decls func testUnsafe(_ ut: UnsafeType) { // expected-warning{{reference to unsafe struct 'UnsafeType'}} diff --git a/test/Unsafe/unsafe_stdlib.swift b/test/Unsafe/unsafe_stdlib.swift index 52248bd7aca..a61e88451a0 100644 --- a/test/Unsafe/unsafe_stdlib.swift +++ b/test/Unsafe/unsafe_stdlib.swift @@ -3,6 +3,9 @@ // Make sure everything compiles without error when unsafe code is allowed. // RUN: %target-swift-frontend -typecheck -enable-experimental-feature AllowUnsafeAttribute -warnings-as-errors %s +// REQUIRES: swift_feature_AllowUnsafeAttribute +// REQUIRES: swift_feature_WarnUnsafe + func test( x: OpaquePointer, // expected-warning{{reference to unsafe struct 'OpaquePointer'}} other: UnsafeMutablePointer // expected-warning{{reference to unsafe generic struct 'UnsafeMutablePointer'}} diff --git a/test/Volatile/volatile-exec.swift b/test/Volatile/volatile-exec.swift index 3c0370310e7..1e249170122 100644 --- a/test/Volatile/volatile-exec.swift +++ b/test/Volatile/volatile-exec.swift @@ -2,6 +2,7 @@ // REQUIRES: executable_test // REQUIRES: volatile +// REQUIRES: swift_feature_Volatile import _Volatile diff --git a/test/Volatile/volatile-feature-flag.swift b/test/Volatile/volatile-feature-flag.swift index 788e981cdb3..32f0209dcc6 100644 --- a/test/Volatile/volatile-feature-flag.swift +++ b/test/Volatile/volatile-feature-flag.swift @@ -3,6 +3,7 @@ // RUN: %target-swift-emit-ir %s -module-name main -parse-as-library -enable-experimental-feature Volatile // REQUIRES: volatile +// REQUIRES: swift_feature_Volatile import _Volatile diff --git a/test/Volatile/volatile-ir.swift b/test/Volatile/volatile-ir.swift index d11e572694e..baed3422928 100644 --- a/test/Volatile/volatile-ir.swift +++ b/test/Volatile/volatile-ir.swift @@ -4,6 +4,7 @@ // RUN: %target-swift-emit-ir %s -module-name main -parse-as-library -enable-experimental-feature Volatile -Osize | %FileCheck %s // REQUIRES: volatile +// REQUIRES: swift_feature_Volatile import _Volatile diff --git a/test/Volatile/volatile-null.swift b/test/Volatile/volatile-null.swift index 9c1f9fcf82b..02f8d0e67fa 100644 --- a/test/Volatile/volatile-null.swift +++ b/test/Volatile/volatile-null.swift @@ -4,6 +4,7 @@ // RUN: %target-swift-emit-ir %s -module-name main -parse-as-library -enable-experimental-feature Volatile -Osize | %FileCheck %s // REQUIRES: volatile +// REQUIRES: swift_feature_Volatile import _Volatile diff --git a/test/Volatile/volatile-repeat-loads.swift b/test/Volatile/volatile-repeat-loads.swift index 460a1b6f294..efa93cf9a8a 100644 --- a/test/Volatile/volatile-repeat-loads.swift +++ b/test/Volatile/volatile-repeat-loads.swift @@ -4,6 +4,7 @@ // RUN: %target-swift-emit-ir %s -module-name main -parse-as-library -enable-experimental-feature Volatile -Osize | %FileCheck %s // REQUIRES: volatile +// REQUIRES: swift_feature_Volatile import _Volatile diff --git a/test/attr/ApplicationMain/attr_NSApplicationMain.swift b/test/attr/ApplicationMain/attr_NSApplicationMain.swift index 52f8501706b..71c5f361976 100644 --- a/test/attr/ApplicationMain/attr_NSApplicationMain.swift +++ b/test/attr/ApplicationMain/attr_NSApplicationMain.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -enable-upcoming-feature DeprecateApplicationMain -verify -verify-additional-prefix deprecated- %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import AppKit diff --git a/test/attr/ApplicationMain/attr_NSApplicationMain_inherited.swift b/test/attr/ApplicationMain/attr_NSApplicationMain_inherited.swift index a3dd7cdc85b..c99e62c4641 100644 --- a/test/attr/ApplicationMain/attr_NSApplicationMain_inherited.swift +++ b/test/attr/ApplicationMain/attr_NSApplicationMain_inherited.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -enable-upcoming-feature DeprecateApplicationMain -verify -verify-additional-prefix deprecated- %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import AppKit diff --git a/test/attr/ApplicationMain/attr_NSApplicationMain_multi_file/another_delegate.swift b/test/attr/ApplicationMain/attr_NSApplicationMain_multi_file/another_delegate.swift index b54d3cb43a1..d75ef3f959e 100644 --- a/test/attr/ApplicationMain/attr_NSApplicationMain_multi_file/another_delegate.swift +++ b/test/attr/ApplicationMain/attr_NSApplicationMain_multi_file/another_delegate.swift @@ -7,6 +7,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-name main -parse-as-library -typecheck -enable-upcoming-feature DeprecateApplicationMain %t.swiftmodule -primary-file %S/delegate.swift -verify -verify-ignore-unknown -verify-additional-prefix deprecated- // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import AppKit diff --git a/test/attr/ApplicationMain/attr_NSApplicationMain_multiple.swift b/test/attr/ApplicationMain/attr_NSApplicationMain_multiple.swift index c8097fed5a5..213a6eb6de4 100644 --- a/test/attr/ApplicationMain/attr_NSApplicationMain_multiple.swift +++ b/test/attr/ApplicationMain/attr_NSApplicationMain_multiple.swift @@ -3,6 +3,7 @@ // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import AppKit diff --git a/test/attr/ApplicationMain/attr_NSApplicationMain_not_NSApplicationDelegate.swift b/test/attr/ApplicationMain/attr_NSApplicationMain_not_NSApplicationDelegate.swift index 10bab06fe16..23f25e4dc76 100644 --- a/test/attr/ApplicationMain/attr_NSApplicationMain_not_NSApplicationDelegate.swift +++ b/test/attr/ApplicationMain/attr_NSApplicationMain_not_NSApplicationDelegate.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -enable-upcoming-feature DeprecateApplicationMain -verify -verify-additional-prefix deprecated- %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import AppKit diff --git a/test/attr/ApplicationMain/attr_UIApplicationMain.swift b/test/attr/ApplicationMain/attr_UIApplicationMain.swift index 2566ff86835..97bbdee6c32 100644 --- a/test/attr/ApplicationMain/attr_UIApplicationMain.swift +++ b/test/attr/ApplicationMain/attr_UIApplicationMain.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -enable-upcoming-feature DeprecateApplicationMain -verify -verify-additional-prefix deprecated- %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import UIKit diff --git a/test/attr/ApplicationMain/attr_UIApplicationMain_inherited.swift b/test/attr/ApplicationMain/attr_UIApplicationMain_inherited.swift index 5e1e5940e5b..b6243bf7dc7 100644 --- a/test/attr/ApplicationMain/attr_UIApplicationMain_inherited.swift +++ b/test/attr/ApplicationMain/attr_UIApplicationMain_inherited.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -enable-upcoming-feature DeprecateApplicationMain -verify -verify-additional-prefix deprecated- %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import UIKit diff --git a/test/attr/ApplicationMain/attr_UIApplicationMain_multiple.swift b/test/attr/ApplicationMain/attr_UIApplicationMain_multiple.swift index 19be3fd7f77..d66ec5d12cb 100644 --- a/test/attr/ApplicationMain/attr_UIApplicationMain_multiple.swift +++ b/test/attr/ApplicationMain/attr_UIApplicationMain_multiple.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -enable-upcoming-feature DeprecateApplicationMain -verify -verify-additional-prefix deprecated- %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import UIKit diff --git a/test/attr/ApplicationMain/attr_UIApplicationMain_not_UIApplicationDelegate.swift b/test/attr/ApplicationMain/attr_UIApplicationMain_not_UIApplicationDelegate.swift index 5e35191ed2f..650379d8a58 100644 --- a/test/attr/ApplicationMain/attr_UIApplicationMain_not_UIApplicationDelegate.swift +++ b/test/attr/ApplicationMain/attr_UIApplicationMain_not_UIApplicationDelegate.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -enable-upcoming-feature DeprecateApplicationMain -verify -verify-additional-prefix deprecated- %s // REQUIRES: objc_interop +// REQUIRES: swift_feature_DeprecateApplicationMain import UIKit diff --git a/test/attr/attr_dynamic_member_lookup.swift b/test/attr/attr_dynamic_member_lookup.swift index 60914132c9f..17c203828a1 100644 --- a/test/attr/attr_dynamic_member_lookup.swift +++ b/test/attr/attr_dynamic_member_lookup.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -// REQUIRES: asserts +// REQUIRES: swift_feature_KeyPathWithStaticMembers var global = 42 diff --git a/test/attr/attr_extern.swift b/test/attr/attr_extern.swift index b75a03d35a8..c84def8737c 100644 --- a/test/attr/attr_extern.swift +++ b/test/attr/attr_extern.swift @@ -2,6 +2,7 @@ // https://github.com/apple/swift/issues/70776 // REQUIRES: github70776 +// REQUIRES: swift_feature_Extern @_extern(wasm, module: "m1", name: "f1") func f1(x: Int) -> Int diff --git a/test/attr/attr_extern_fixit.swift b/test/attr/attr_extern_fixit.swift index e8fc3f99d9f..a247b5f63c9 100644 --- a/test/attr/attr_extern_fixit.swift +++ b/test/attr/attr_extern_fixit.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature Extern -emit-fixits-path %t.remap -fixit-all // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result +// REQUIRES: swift_feature_Extern + @_extern(c) // expected-warning {{C name '+' may be invalid; explicitly specify the name in @_extern(c) to suppress this warning}} func +(a: Int, b: Bool) -> Bool diff --git a/test/attr/attr_extern_fixit.swift.result b/test/attr/attr_extern_fixit.swift.result index 3794a827456..df3ac227ca2 100644 --- a/test/attr/attr_extern_fixit.swift.result +++ b/test/attr/attr_extern_fixit.swift.result @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature Extern -emit-fixits-path %t.remap -fixit-all // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result +// REQUIRES: swift_feature_Extern + @_extern(c, "+") // expected-warning {{C name '+' may be invalid; explicitly specify the name in @_extern(c) to suppress this warning}} func +(a: Int, b: Bool) -> Bool diff --git a/test/attr/attr_silgen_name.swift b/test/attr/attr_silgen_name.swift index 3a5d370f570..6726d4d9cb4 100644 --- a/test/attr/attr_silgen_name.swift +++ b/test/attr/attr_silgen_name.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature Extern +// REQUIRES: swift_feature_Extern + @_silgen_name("foo") // expected-note {{attribute already specified here}} @_silgen_name("bar") // expected-error {{duplicate attribute}} func duplicateAsmName() {} diff --git a/test/attr/attr_static_exclusive_only.swift b/test/attr/attr_static_exclusive_only.swift index 84999aefd96..543b885b000 100644 --- a/test/attr/attr_static_exclusive_only.swift +++ b/test/attr/attr_static_exclusive_only.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature StaticExclusiveOnly +// REQUIRES: swift_feature_StaticExclusiveOnly + @_staticExclusiveOnly // expected-error {{@_staticExclusiveOnly can only be applied to noncopyable types}} struct A {} diff --git a/test/attr/attr_unavailable_in_embedded.swift b/test/attr/attr_unavailable_in_embedded.swift index 79cf9f85ad8..b035b6c4afe 100644 --- a/test/attr/attr_unavailable_in_embedded.swift +++ b/test/attr/attr_unavailable_in_embedded.swift @@ -1,6 +1,8 @@ // RUN: %target-swift-frontend -typecheck %s -parse-stdlib -print-ast | %FileCheck %s --check-prefix=CHECK-NON-EMBEDDED // RUN: %target-swift-frontend -typecheck %s -parse-stdlib -enable-experimental-feature Embedded -print-ast | %FileCheck %s --check-prefix=CHECK-EMBEDDED +// REQUIRES: swift_feature_Embedded + // CHECK-NON-EMBEDDED-NOT: @available // CHECK-NON-EMBEDDED-NOT: @_unavailableInEmbedded // CHECK-NON-EMBEDDED: public func unavailable() diff --git a/test/attr/global_actor.swift b/test/attr/global_actor.swift index 48d5dd981b9..064c8906e78 100644 --- a/test/attr/global_actor.swift +++ b/test/attr/global_actor.swift @@ -1,5 +1,6 @@ // RUN: %target-swift-frontend -typecheck -verify %s -disable-availability-checking -package-name myPkg -enable-experimental-feature IsolatedDeinit // REQUIRES: concurrency +// REQUIRES: swift_feature_IsolatedDeinit actor SomeActor { } @@ -156,11 +157,11 @@ do { var test1: Int { get { 42 } @GA1 - set { } // expected-warning {{setter cannot have a global actor}} {{158:7-11=}} - // expected-note@-1 {{move global actor attribute to property 'test1'}} {{156:5-5=@GA1}} + set { } // expected-warning {{setter cannot have a global actor}} {{-1:7-11=}} + // expected-note@-1 {{move global actor attribute to property 'test1'}} {{-3:5-5=@GA1}} @GA1 _modify { fatalError() } // expected-warning {{_modify accessor cannot have a global actor}} {{7-12=}} - // expected-note@-1 {{move global actor attribute to property 'test1'}} {{156:5-5=@GA1}} + // expected-note@-1 {{move global actor attribute to property 'test1'}} {{-6:5-5=@GA1}} } func local() { @@ -182,22 +183,22 @@ do { var test1: Int { get { 42 } @GA1 - set { } // expected-warning {{setter cannot have a global actor}} {{184:7-11=}} - // expected-note@-1 {{move global actor attribute to property 'test1'}} {{182:5-5=@GA1}} + set { } // expected-warning {{setter cannot have a global actor}} {{-1:7-11=}} + // expected-note@-1 {{move global actor attribute to property 'test1'}} {{-3:5-5=@GA1}} @GA1 _modify { fatalError() } // expected-warning {{_modify accessor cannot have a global actor}} {{7-12=}} - // expected-note@-1 {{move global actor attribute to property 'test1'}} {{182:5-5=@GA1}} + // expected-note@-1 {{move global actor attribute to property 'test1'}} {{-5:5-5=@GA1}} } var test2: Int { @GA1 willSet { // expected-warning {{willSet observer cannot have a global actor}} {{7-12=}} - // expected-note@-1 {{move global actor attribute to property 'test2'}} {{191:5-5=@GA1}} + // expected-note@-1 {{move global actor attribute to property 'test2'}} {{-1:5-5=@GA1}} } } subscript(x: Int) -> Bool { get { true } @GA1 set { } // expected-warning {{setter cannot have a global actor}} {{7-12=}} - // expected-note@-1 {{move global actor attribute to subscript 'subscript(_:)'}} {{197:5-5=@GA1}} + // expected-note@-1 {{move global actor attribute to subscript 'subscript(_:)'}} {{-2:5-5=@GA1}} } @GA1 subscript(y: Bool) -> String { diff --git a/test/decl/ext/cdecl_implementation_features.swift b/test/decl/ext/cdecl_implementation_features.swift index e3899738a2f..54ea098acb9 100644 --- a/test/decl/ext/cdecl_implementation_features.swift +++ b/test/decl/ext/cdecl_implementation_features.swift @@ -1,6 +1,8 @@ // RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -typecheck %s -import-objc-header %S/Inputs/objc_implementation.h 2>&1 | %FileCheck --check-prefixes NO,CHECK %s // RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -typecheck %s -import-objc-header %S/Inputs/objc_implementation.h -enable-experimental-feature CImplementation 2>&1 | %FileCheck --check-prefixes YES,C,CHECK %s +// REQUIRES: swift_feature_CImplementation + // YES-DAG: cdecl_implementation_features.swift:[[@LINE+4]]:{{[0-9]+}}: warning: global function 'CImplFunc1' of type '(Double) -> ()' does not match type '(Int32) -> Void' declared by the header; this will become an error after adopting '@implementation' // NO-DAG: cdecl_implementation_features.swift:[[@LINE+3]]:{{[0-9]+}}: error: '_objcImplementation' attribute is only valid when experimental feature CImplementation is enabled // YES-NOT: cdecl_implementation_features.swift:[[@LINE+2]]:{{[0-9]+}}: warning: '@_objcImplementation' is deprecated; use '@implementation' instead diff --git a/test/decl/ext/objc_implementation.swift b/test/decl/ext/objc_implementation.swift index 0ce1105f7a3..8fa6d92f098 100644 --- a/test/decl/ext/objc_implementation.swift +++ b/test/decl/ext/objc_implementation.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -import-objc-header %S/Inputs/objc_implementation.h -enable-experimental-feature ObjCImplementation -enable-experimental-feature CImplementation -target %target-stable-abi-triple // REQUIRES: objc_interop +// REQUIRES: swift_feature_CImplementation +// REQUIRES: swift_feature_ObjCImplementation protocol EmptySwiftProto {} diff --git a/test/decl/ext/objc_implementation_deployment_target.swift b/test/decl/ext/objc_implementation_deployment_target.swift index d64efd0bf01..0735cb2225e 100644 --- a/test/decl/ext/objc_implementation_deployment_target.swift +++ b/test/decl/ext/objc_implementation_deployment_target.swift @@ -2,6 +2,7 @@ // RUN: %target-typecheck-verify-swift -import-objc-header %S/Inputs/objc_implementation.h -target x86_64-apple-macosx10.14.3 -enable-experimental-feature ObjCImplementation // REQUIRES: objc_interop // REQUIRES: OS=macosx +// REQUIRES: swift_feature_ObjCImplementation @objc @implementation extension ObjCImplSubclass { // expected-error@-1 {{'@implementation' of an Objective-C class requires a minimum deployment target of at least macOS 10.14.4}} diff --git a/test/decl/ext/objc_implementation_early_adopter.swift b/test/decl/ext/objc_implementation_early_adopter.swift index b3ca27d278f..223860de60e 100644 --- a/test/decl/ext/objc_implementation_early_adopter.swift +++ b/test/decl/ext/objc_implementation_early_adopter.swift @@ -1,5 +1,7 @@ // RUN: %target-typecheck-verify-swift -import-objc-header %S/Inputs/objc_implementation.h -enable-experimental-feature ObjCImplementation -enable-experimental-feature CImplementation -target %target-stable-abi-triple // REQUIRES: objc_interop +// REQUIRES: swift_feature_CImplementation +// REQUIRES: swift_feature_ObjCImplementation protocol EmptySwiftProto {} diff --git a/test/embedded/FixedArray.swift b/test/embedded/FixedArray.swift index ffb8c051b71..a51a7dfcda1 100644 --- a/test/embedded/FixedArray.swift +++ b/test/embedded/FixedArray.swift @@ -11,6 +11,8 @@ // REQUIRES: optimized_stdlib // REQUIRES: VENDOR=apple // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_FixedArrays func simpleStackAllocated() { var a = FixedArray(capacity: 10) diff --git a/test/embedded/accessor-unavailable.swift b/test/embedded/accessor-unavailable.swift index a10b520b053..dac0694e028 100644 --- a/test/embedded/accessor-unavailable.swift +++ b/test/embedded/accessor-unavailable.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: VENDOR=apple // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded struct Foo { public subscript(x: Int) -> Int { diff --git a/test/embedded/anyobject-error-no-stdlib.swift b/test/embedded/anyobject-error-no-stdlib.swift index 56ef0c6f72a..0385618785a 100644 --- a/test/embedded/anyobject-error-no-stdlib.swift +++ b/test/embedded/anyobject-error-no-stdlib.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir -parse-stdlib %s -enable-experimental-feature Embedded -verify -wmo // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded public enum Never {} diff --git a/test/embedded/array-builtins-exec.swift b/test/embedded/array-builtins-exec.swift index 97521b08440..98b9770ce62 100644 --- a/test/embedded/array-builtins-exec.swift +++ b/test/embedded/array-builtins-exec.swift @@ -7,6 +7,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded import Builtin diff --git a/test/embedded/array-builtins-no-stdlib.swift b/test/embedded/array-builtins-no-stdlib.swift index 016b72a6080..c7fc32f280e 100644 --- a/test/embedded/array-builtins-no-stdlib.swift +++ b/test/embedded/array-builtins-no-stdlib.swift @@ -3,6 +3,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -module-name Swift -enable-experimental-feature Embedded -wmo -target arm64e-apple-none -O | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // TODO: these builtins in embedded Swift have a completely different IRGen, we need executable tests for them. diff --git a/test/embedded/array-to-pointer.swift b/test/embedded/array-to-pointer.swift index 4448be0342c..d6f0b37838b 100644 --- a/test/embedded/array-to-pointer.swift +++ b/test/embedded/array-to-pointer.swift @@ -8,6 +8,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @_extern(c, "putchar") @discardableResult diff --git a/test/embedded/array-zero-size-struct.swift b/test/embedded/array-zero-size-struct.swift index 74a2f1daf93..465582bd092 100644 --- a/test/embedded/array-zero-size-struct.swift +++ b/test/embedded/array-zero-size-struct.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct MyStruct { } diff --git a/test/embedded/arrays-enums.swift b/test/embedded/arrays-enums.swift index e6f440eee68..575211c2f00 100644 --- a/test/embedded/arrays-enums.swift +++ b/test/embedded/arrays-enums.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded enum Node { indirect case inner(Node, Node) diff --git a/test/embedded/arrays.swift b/test/embedded/arrays.swift index ef8abb4b52d..ed0cb09acaf 100644 --- a/test/embedded/arrays.swift +++ b/test/embedded/arrays.swift @@ -8,6 +8,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @_extern(c, "putchar") @discardableResult diff --git a/test/embedded/attr-unavailable-in-embedded.swift b/test/embedded/attr-unavailable-in-embedded.swift index 5275d2de076..b35f0a1c171 100644 --- a/test/embedded/attr-unavailable-in-embedded.swift +++ b/test/embedded/attr-unavailable-in-embedded.swift @@ -5,6 +5,7 @@ // RUN: %target-swift-frontend -typecheck -verify -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/availability-code-removal.swift b/test/embedded/availability-code-removal.swift index b88608b8c2c..5cb1436d03f 100644 --- a/test/embedded/availability-code-removal.swift +++ b/test/embedded/availability-code-removal.swift @@ -11,6 +11,7 @@ // RUN: %target-swift-frontend -emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -wmo | %FileCheck %s --check-prefix CHECK-B // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded public protocol Player {} struct Concrete: Player {} diff --git a/test/embedded/availability.swift b/test/embedded/availability.swift index 14a236a1019..e99d100c9e5 100644 --- a/test/embedded/availability.swift +++ b/test/embedded/availability.swift @@ -1,6 +1,7 @@ // RUN: %target-typecheck-verify-swift -parse-stdlib -enable-experimental-feature Embedded // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded @_unavailableInEmbedded public struct UnavailableInEmbedded {} diff --git a/test/embedded/avr/testStdlibFunctioning.swift b/test/embedded/avr/testStdlibFunctioning.swift index 4755348e349..35883437094 100644 --- a/test/embedded/avr/testStdlibFunctioning.swift +++ b/test/embedded/avr/testStdlibFunctioning.swift @@ -2,6 +2,7 @@ // RUN: -wmo -enable-experimental-feature Embedded // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: CODEGENERATOR=AVR +// REQUIRES: swift_feature_Embedded import Swift diff --git a/test/embedded/basic-errors-no-stdlib.swift b/test/embedded/basic-errors-no-stdlib.swift index 9ff15ff5834..526dd4f8b5d 100644 --- a/test/embedded/basic-errors-no-stdlib.swift +++ b/test/embedded/basic-errors-no-stdlib.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-frontend -emit-ir -verify %s -parse-stdlib -enable-experimental-feature Embedded -wmo // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded public protocol Player {} struct Concrete: Player {} diff --git a/test/embedded/basic-irgen-no-stdlib.swift b/test/embedded/basic-irgen-no-stdlib.swift index 40f804227b3..1154cc35f2a 100644 --- a/test/embedded/basic-irgen-no-stdlib.swift +++ b/test/embedded/basic-irgen-no-stdlib.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded struct Bool {} diff --git a/test/embedded/basic-modules-generics-no-stdlib.swift b/test/embedded/basic-modules-generics-no-stdlib.swift index 8a3491145aa..8b77d8a3390 100644 --- a/test/embedded/basic-modules-generics-no-stdlib.swift +++ b/test/embedded/basic-modules-generics-no-stdlib.swift @@ -5,6 +5,7 @@ // RUN: %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/basic-modules-no-stdlib.swift b/test/embedded/basic-modules-no-stdlib.swift index 25e6ffb39f2..cbe59051484 100644 --- a/test/embedded/basic-modules-no-stdlib.swift +++ b/test/embedded/basic-modules-no-stdlib.swift @@ -5,6 +5,7 @@ // RUN: %target-swift-frontend -swift-version 5 -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded -wmo | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/basic-modules-validation-no-stdlib.swift b/test/embedded/basic-modules-validation-no-stdlib.swift index 90a9791204e..75009858388 100644 --- a/test/embedded/basic-modules-validation-no-stdlib.swift +++ b/test/embedded/basic-modules-validation-no-stdlib.swift @@ -14,6 +14,7 @@ // RUN: not %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib -wmo 2>&1 | %FileCheck %s --check-prefix CHECK-B // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/builtins-misc.swift b/test/embedded/builtins-misc.swift index c9a27f98bff..c83ab308f03 100644 --- a/test/embedded/builtins-misc.swift +++ b/test/embedded/builtins-misc.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -module-name Swift -enable-experimental-feature Embedded -wmo -target arm64e-apple-none | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded class MyClass {} diff --git a/test/embedded/class-func.swift b/test/embedded/class-func.swift index d9a5252988e..5ac34d104f5 100644 --- a/test/embedded/class-func.swift +++ b/test/embedded/class-func.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/classes-arrays.swift b/test/embedded/classes-arrays.swift index f43bc10c204..7c4039b5387 100644 --- a/test/embedded/classes-arrays.swift +++ b/test/embedded/classes-arrays.swift @@ -7,6 +7,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded class MyClass { init() { print("MyClass.init") } diff --git a/test/embedded/classes-generic-no-stdlib.swift b/test/embedded/classes-generic-no-stdlib.swift index 0a8e85c7043..d0611a142b6 100644 --- a/test/embedded/classes-generic-no-stdlib.swift +++ b/test/embedded/classes-generic-no-stdlib.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo | %FileCheck %s --check-prefix CHECK-IR // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded precedencegroup AssignmentPrecedence { assignment: true } diff --git a/test/embedded/classes-indirect-return.swift b/test/embedded/classes-indirect-return.swift index 24acbe07da8..d60f2ab8cb4 100644 --- a/test/embedded/classes-indirect-return.swift +++ b/test/embedded/classes-indirect-return.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // CHECK: sil @$s4main1XC3fooxyFSi_Tg5 : $@convention(method) (@guaranteed X) -> Int { diff --git a/test/embedded/classes-methods-no-stdlib.swift b/test/embedded/classes-methods-no-stdlib.swift index c036ab8d054..a41341c49f7 100644 --- a/test/embedded/classes-methods-no-stdlib.swift +++ b/test/embedded/classes-methods-no-stdlib.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded public class MyClass { func foo() { } diff --git a/test/embedded/classes-no-stdlib.swift b/test/embedded/classes-no-stdlib.swift index 4edbca34ba5..367e01cac77 100644 --- a/test/embedded/classes-no-stdlib.swift +++ b/test/embedded/classes-no-stdlib.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded public class MyClass {} diff --git a/test/embedded/classes-non-final-method-no-stdlib.swift b/test/embedded/classes-non-final-method-no-stdlib.swift index 56a64b13e3f..ecd8c8465af 100644 --- a/test/embedded/classes-non-final-method-no-stdlib.swift +++ b/test/embedded/classes-non-final-method-no-stdlib.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir -verify %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded public class MyClass { func foo(t: T) { } // expected-error {{classes cannot have non-final generic functions in embedded Swift}} diff --git a/test/embedded/classes-optional.swift b/test/embedded/classes-optional.swift index 77ecb07830c..e5ec9be6531 100644 --- a/test/embedded/classes-optional.swift +++ b/test/embedded/classes-optional.swift @@ -7,6 +7,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded class Foo { var foo: Foo? diff --git a/test/embedded/classes-stack-promotion.swift b/test/embedded/classes-stack-promotion.swift index eea05f4ee7b..e7473001c3e 100644 --- a/test/embedded/classes-stack-promotion.swift +++ b/test/embedded/classes-stack-promotion.swift @@ -8,6 +8,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public class MyClass { public init() { print("MyClass.init") } diff --git a/test/embedded/classes.swift b/test/embedded/classes.swift index b34b21e74ac..cc2e03180b8 100644 --- a/test/embedded/classes.swift +++ b/test/embedded/classes.swift @@ -7,6 +7,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded class MyClass { init() { print("MyClass.init") } diff --git a/test/embedded/closures-heap.swift b/test/embedded/closures-heap.swift index 6f09b60f090..b308a6c9fb1 100644 --- a/test/embedded/closures-heap.swift +++ b/test/embedded/closures-heap.swift @@ -7,6 +7,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public class MyClass { var handler: (()->())? = nil diff --git a/test/embedded/closures.swift b/test/embedded/closures.swift index 304edf71989..84130c0448b 100644 --- a/test/embedded/closures.swift +++ b/test/embedded/closures.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -wmo // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded public func foo(_ body: () -> Result) -> Result { return body() diff --git a/test/embedded/collection.swift b/test/embedded/collection.swift index 1701ed0ce12..502fd39a336 100644 --- a/test/embedded/collection.swift +++ b/test/embedded/collection.swift @@ -8,6 +8,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @_extern(c, "putchar") @discardableResult diff --git a/test/embedded/compeval-print.swift b/test/embedded/compeval-print.swift index 1d8a4a81b33..d7019b77e59 100644 --- a/test/embedded/compeval-print.swift +++ b/test/embedded/compeval-print.swift @@ -9,6 +9,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded import MyCustomMessage diff --git a/test/embedded/concurrency-actors.swift b/test/embedded/concurrency-actors.swift index 517a61770cd..694b2427068 100644 --- a/test/embedded/concurrency-actors.swift +++ b/test/embedded/concurrency-actors.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/concurrency-async-let.swift b/test/embedded/concurrency-async-let.swift index b84b6accb37..0cf725927f9 100644 --- a/test/embedded/concurrency-async-let.swift +++ b/test/embedded/concurrency-async-let.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/concurrency-builtins.swift b/test/embedded/concurrency-builtins.swift index 4872136e228..0fc1b4cba03 100644 --- a/test/embedded/concurrency-builtins.swift +++ b/test/embedded/concurrency-builtins.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import Builtin diff --git a/test/embedded/concurrency-continuations.swift b/test/embedded/concurrency-continuations.swift index 3de06a15c0d..0ae57902564 100644 --- a/test/embedded/concurrency-continuations.swift +++ b/test/embedded/concurrency-continuations.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/concurrency-leaks.swift b/test/embedded/concurrency-leaks.swift index 17d2ea4c562..f4484f30ebd 100644 --- a/test/embedded/concurrency-leaks.swift +++ b/test/embedded/concurrency-leaks.swift @@ -8,6 +8,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/concurrency-simple.swift b/test/embedded/concurrency-simple.swift index ee4dff08c74..aaa45c289d1 100644 --- a/test/embedded/concurrency-simple.swift +++ b/test/embedded/concurrency-simple.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/concurrency-stream.swift b/test/embedded/concurrency-stream.swift index 95585f64931..0a7ed1df852 100644 --- a/test/embedded/concurrency-stream.swift +++ b/test/embedded/concurrency-stream.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/concurrency-taskgroup.swift b/test/embedded/concurrency-taskgroup.swift index 1f8851db635..c6f318c3ca5 100644 --- a/test/embedded/concurrency-taskgroup.swift +++ b/test/embedded/concurrency-taskgroup.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/concurrency-taskgroup2.swift b/test/embedded/concurrency-taskgroup2.swift index 9ee439d01b9..c3774e9bed2 100644 --- a/test/embedded/concurrency-taskgroup2.swift +++ b/test/embedded/concurrency-taskgroup2.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/conditionals.swift b/test/embedded/conditionals.swift index 2f39af9e681..634a89d05bc 100644 --- a/test/embedded/conditionals.swift +++ b/test/embedded/conditionals.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded | %FileCheck %s --check-prefix EMBEDDED // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded #if $Embedded public func embedded() { } diff --git a/test/embedded/custom-executor.swift b/test/embedded/custom-executor.swift index 2d539430fbe..e6d07e030c0 100644 --- a/test/embedded/custom-executor.swift +++ b/test/embedded/custom-executor.swift @@ -8,6 +8,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/custom-print.swift b/test/embedded/custom-print.swift index 52eee837e0f..c75b57b10c8 100644 --- a/test/embedded/custom-print.swift +++ b/test/embedded/custom-print.swift @@ -6,6 +6,8 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @_extern(c, "putchar") @discardableResult diff --git a/test/embedded/darwin-bridging-header.swift b/test/embedded/darwin-bridging-header.swift index e919e8ee0a1..6f4577332ee 100644 --- a/test/embedded/darwin-bridging-header.swift +++ b/test/embedded/darwin-bridging-header.swift @@ -10,6 +10,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: VENDOR=apple // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded // BEGIN BridgingHeader.h diff --git a/test/embedded/darwin.swift b/test/embedded/darwin.swift index e15cf66d88a..42bf9b90661 100644 --- a/test/embedded/darwin.swift +++ b/test/embedded/darwin.swift @@ -8,6 +8,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: VENDOR=apple // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import Darwin diff --git a/test/embedded/debuginfo-dwarf-types.swift b/test/embedded/debuginfo-dwarf-types.swift index b9e03a5baa8..d437da79257 100644 --- a/test/embedded/debuginfo-dwarf-types.swift +++ b/test/embedded/debuginfo-dwarf-types.swift @@ -11,6 +11,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct MyType { var x, y: Int diff --git a/test/embedded/debuginfo.swift b/test/embedded/debuginfo.swift index 726fbf7affb..c1d70be20f0 100644 --- a/test/embedded/debuginfo.swift +++ b/test/embedded/debuginfo.swift @@ -8,6 +8,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func foo(_ array: inout [T]) { array.withUnsafeMutableBytes { diff --git a/test/embedded/default-arguments.swift b/test/embedded/default-arguments.swift index 0e09b8699cb..d79e83119b7 100644 --- a/test/embedded/default-arguments.swift +++ b/test/embedded/default-arguments.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: VENDOR=apple // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded // Check that this doesn't crash the compiler in embedded mode. diff --git a/test/embedded/deinit-release.swift b/test/embedded/deinit-release.swift index bce697e5525..022533b7acc 100644 --- a/test/embedded/deinit-release.swift +++ b/test/embedded/deinit-release.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded class C {} diff --git a/test/embedded/deinit-release2.swift b/test/embedded/deinit-release2.swift index 2209136c9d1..decb5d2905b 100644 --- a/test/embedded/deinit-release2.swift +++ b/test/embedded/deinit-release2.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public var global_c: C? = nil diff --git a/test/embedded/dependencies-concurrency-custom-executor.swift b/test/embedded/dependencies-concurrency-custom-executor.swift index a0df3d5a870..4f3e4c172c2 100644 --- a/test/embedded/dependencies-concurrency-custom-executor.swift +++ b/test/embedded/dependencies-concurrency-custom-executor.swift @@ -35,6 +35,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/dependencies-concurrency-custom-executor2.swift b/test/embedded/dependencies-concurrency-custom-executor2.swift index 89d56f4c179..edb1c91103c 100644 --- a/test/embedded/dependencies-concurrency-custom-executor2.swift +++ b/test/embedded/dependencies-concurrency-custom-executor2.swift @@ -35,6 +35,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/dependencies-concurrency.swift b/test/embedded/dependencies-concurrency.swift index d284bb524be..f4b9b61bfa1 100644 --- a/test/embedded/dependencies-concurrency.swift +++ b/test/embedded/dependencies-concurrency.swift @@ -35,6 +35,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/dependencies-concurrency2.swift b/test/embedded/dependencies-concurrency2.swift index 257c7872ce9..3eb7d25076b 100644 --- a/test/embedded/dependencies-concurrency2.swift +++ b/test/embedded/dependencies-concurrency2.swift @@ -42,6 +42,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded import _Concurrency diff --git a/test/embedded/dependencies-no-allocations.swift b/test/embedded/dependencies-no-allocations.swift index 1ad28c2a329..7b285cc8ebb 100644 --- a/test/embedded/dependencies-no-allocations.swift +++ b/test/embedded/dependencies-no-allocations.swift @@ -25,6 +25,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern // UNSUPPORTED: OS=linux-gnu && CPU=aarch64 @_extern(c, "putchar") diff --git a/test/embedded/dependencies-print.swift b/test/embedded/dependencies-print.swift index fbad1698fce..adaf41c2a6b 100644 --- a/test/embedded/dependencies-print.swift +++ b/test/embedded/dependencies-print.swift @@ -27,6 +27,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // UNSUPPORTED: OS=linux-gnu && CPU=aarch64 print("Hello Embedded Swift!") // CHECK: Hello Embedded Swift! diff --git a/test/embedded/dependencies-random.swift b/test/embedded/dependencies-random.swift index b06a8d2feb0..0e4ecc1220d 100644 --- a/test/embedded/dependencies-random.swift +++ b/test/embedded/dependencies-random.swift @@ -32,6 +32,7 @@ // UNSUPPORTED: OS=linux-gnu && CPU=aarch64 // REQUIRES: rdar121923818 +// REQUIRES: swift_feature_Embedded @_extern(c, "putchar") @discardableResult diff --git a/test/embedded/dependencies.swift b/test/embedded/dependencies.swift index f51eb459dde..c7fd449357f 100644 --- a/test/embedded/dependencies.swift +++ b/test/embedded/dependencies.swift @@ -27,6 +27,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern // UNSUPPORTED: OS=linux-gnu && CPU=aarch64 @_extern(c, "putchar") diff --git a/test/embedded/deserialize-vtables.swift b/test/embedded/deserialize-vtables.swift index 9e1fa183250..7c24f0164d1 100644 --- a/test/embedded/deserialize-vtables.swift +++ b/test/embedded/deserialize-vtables.swift @@ -6,6 +6,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @main struct Main { diff --git a/test/embedded/dictionary-runtime.swift b/test/embedded/dictionary-runtime.swift index b0c1ef604f7..a4be57a955d 100644 --- a/test/embedded/dictionary-runtime.swift +++ b/test/embedded/dictionary-runtime.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded var dict1: [Int: Int] = [1:10] var dict2: [Int: Int] = [1:20] diff --git a/test/embedded/duration.swift b/test/embedded/duration.swift index f9ae37ec0f3..3bf7473efe8 100644 --- a/test/embedded/duration.swift +++ b/test/embedded/duration.swift @@ -4,6 +4,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @available(SwiftStdlib 5.7, *) extension Duration { diff --git a/test/embedded/dynamic-self.swift b/test/embedded/dynamic-self.swift index 8e8d3acb051..fbba03b1dfb 100644 --- a/test/embedded/dynamic-self.swift +++ b/test/embedded/dynamic-self.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded class MyClass { init() { diff --git a/test/embedded/evolution-with-embedded-diag.swift b/test/embedded/evolution-with-embedded-diag.swift index b805cd10791..25280f409b5 100644 --- a/test/embedded/evolution-with-embedded-diag.swift +++ b/test/embedded/evolution-with-embedded-diag.swift @@ -2,5 +2,6 @@ // RUN: not %target-swift-frontend -emit-ir %s -enable-resilience -enable-experimental-feature Embedded -wmo 2>&1 | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // CHECK: error: Library evolution cannot be enabled with embedded Swift. diff --git a/test/embedded/existential-class-bound1.swift b/test/embedded/existential-class-bound1.swift index 00601613f48..64e03bf1713 100644 --- a/test/embedded/existential-class-bound1.swift +++ b/test/embedded/existential-class-bound1.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded protocol ClassBound: AnyObject { func foo() diff --git a/test/embedded/existential-class-bound2.swift b/test/embedded/existential-class-bound2.swift index 7a4e4ad84ac..e73201b3fc3 100644 --- a/test/embedded/existential-class-bound2.swift +++ b/test/embedded/existential-class-bound2.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded protocol ClassBound: AnyObject { func foo() diff --git a/test/embedded/existential-class-bound3.swift b/test/embedded/existential-class-bound3.swift index dda66630135..232d845585e 100644 --- a/test/embedded/existential-class-bound3.swift +++ b/test/embedded/existential-class-bound3.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded protocol ClassBound: AnyObject { func foo() diff --git a/test/embedded/existential-class-bound4.swift b/test/embedded/existential-class-bound4.swift index d11c3f26b89..a59157a771b 100644 --- a/test/embedded/existential-class-bound4.swift +++ b/test/embedded/existential-class-bound4.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public protocol Base: AnyObject { func foo() diff --git a/test/embedded/existential-class-bound5.swift b/test/embedded/existential-class-bound5.swift index 4917310c690..3f8b5f3f51c 100644 --- a/test/embedded/existential-class-bound5.swift +++ b/test/embedded/existential-class-bound5.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded protocol ClassBound: AnyObject { func foo() diff --git a/test/embedded/existential-class-bound6.swift b/test/embedded/existential-class-bound6.swift index 8a3de46859b..d80b1dd7c17 100644 --- a/test/embedded/existential-class-bound6.swift +++ b/test/embedded/existential-class-bound6.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public var global: AnyObject? = nil diff --git a/test/embedded/existential-class-bound7.swift b/test/embedded/existential-class-bound7.swift index 5462e3b2a4f..3f9f20ddd87 100644 --- a/test/embedded/existential-class-bound7.swift +++ b/test/embedded/existential-class-bound7.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public protocol P: AnyObject { func foo(t: T) diff --git a/test/embedded/existential-class-bound8.swift b/test/embedded/existential-class-bound8.swift index c8a5365cb00..7ad8aad4555 100644 --- a/test/embedded/existential-class-bound8.swift +++ b/test/embedded/existential-class-bound8.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/existential-class-bound9.swift b/test/embedded/existential-class-bound9.swift index 87c43f85647..edfe3877cf1 100644 --- a/test/embedded/existential-class-bound9.swift +++ b/test/embedded/existential-class-bound9.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded protocol ClassBound: AnyObject { func foo() diff --git a/test/embedded/existential-composition.swift b/test/embedded/existential-composition.swift index 89a45fb2c0d..f960a0c2d68 100644 --- a/test/embedded/existential-composition.swift +++ b/test/embedded/existential-composition.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir -parse-as-library -module-name main -verify %s -enable-experimental-feature Embedded -wmo // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded protocol ClassBound: AnyObject { func foo() diff --git a/test/embedded/extensions.swift b/test/embedded/extensions.swift index b3af9ba1168..a05675a3726 100644 --- a/test/embedded/extensions.swift +++ b/test/embedded/extensions.swift @@ -5,6 +5,7 @@ // RUN: %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/failable-crash.swift b/test/embedded/failable-crash.swift index 70e3e64483a..fd42b5857c5 100644 --- a/test/embedded/failable-crash.swift +++ b/test/embedded/failable-crash.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func test() { _ = MyClass(x: 42) diff --git a/test/embedded/float-abi-hard.swift b/test/embedded/float-abi-hard.swift index ca707d3be09..9865085b0ba 100644 --- a/test/embedded/float-abi-hard.swift +++ b/test/embedded/float-abi-hard.swift @@ -9,6 +9,7 @@ // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // BEGIN BridgingHeader.h diff --git a/test/embedded/floatingpoint.swift b/test/embedded/floatingpoint.swift index 22d18e530c2..abaa1cd0557 100644 --- a/test/embedded/floatingpoint.swift +++ b/test/embedded/floatingpoint.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // Check that initializing a Double with an integer literal doesn't result in unresolved symbols @inline(never) diff --git a/test/embedded/fno-builtin.swift b/test/embedded/fno-builtin.swift index 04b595f3b1f..54b11c5859c 100644 --- a/test/embedded/fno-builtin.swift +++ b/test/embedded/fno-builtin.swift @@ -4,6 +4,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func foo() -> [Int] { var a = [1, 2, 3] diff --git a/test/embedded/fragile-reference.swift b/test/embedded/fragile-reference.swift index 7e8c7617b50..7b45cb5bc41 100644 --- a/test/embedded/fragile-reference.swift +++ b/test/embedded/fragile-reference.swift @@ -4,6 +4,7 @@ // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded @main public struct Application { diff --git a/test/embedded/generic-autoclosure.swift b/test/embedded/generic-autoclosure.swift index 5663e2bccdf..61d3f6eef56 100644 --- a/test/embedded/generic-autoclosure.swift +++ b/test/embedded/generic-autoclosure.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: VENDOR=apple // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded public struct UInt23 { } diff --git a/test/embedded/generic-class-multi-module.swift b/test/embedded/generic-class-multi-module.swift index 0b6ef604c11..8656e3de533 100644 --- a/test/embedded/generic-class-multi-module.swift +++ b/test/embedded/generic-class-multi-module.swift @@ -5,6 +5,8 @@ // RUN: %target-swift-frontend -enable-experimental-feature Extern -c -I %t %t/Main.swift -enable-experimental-feature Embedded -o %t/a.o // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern // BEGIN MyModule.swift diff --git a/test/embedded/generic-classes-debuginfo.swift b/test/embedded/generic-classes-debuginfo.swift index 804e53863e9..180cbf71c0e 100644 --- a/test/embedded/generic-classes-debuginfo.swift +++ b/test/embedded/generic-classes-debuginfo.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded struct User { let o: BaseClass diff --git a/test/embedded/generic-classes.swift b/test/embedded/generic-classes.swift index 8bfc1e31ae3..f0d9a5b6972 100644 --- a/test/embedded/generic-classes.swift +++ b/test/embedded/generic-classes.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded protocol Fooable { func foo() diff --git a/test/embedded/generic-classes2.swift b/test/embedded/generic-classes2.swift index d1bd4e3a219..34d33f91fbe 100644 --- a/test/embedded/generic-classes2.swift +++ b/test/embedded/generic-classes2.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded class B { } diff --git a/test/embedded/generic-modules.swift b/test/embedded/generic-modules.swift index 4f7254f71d0..a5cda750547 100644 --- a/test/embedded/generic-modules.swift +++ b/test/embedded/generic-modules.swift @@ -7,6 +7,7 @@ // RUN: %target-swift-frontend -c -o %t/Main.o -I %t %t/Main.swift -enable-experimental-feature Embedded -parse-as-library // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/globals.swift b/test/embedded/globals.swift index e6d8b39fd06..d7231c387c7 100644 --- a/test/embedded/globals.swift +++ b/test/embedded/globals.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: CODEGENERATOR=ARM +// REQUIRES: swift_feature_Embedded precedencegroup AssignmentPrecedence { assignment: true } public typealias IntegerLiteralType = Int diff --git a/test/embedded/hello.swift b/test/embedded/hello.swift index 737f132315c..f39e89a4864 100644 --- a/test/embedded/hello.swift +++ b/test/embedded/hello.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu || OS=none-eabi || OS=none-elf +// REQUIRES: swift_feature_Embedded print("Hello, Embedded Swift!") diff --git a/test/embedded/init-failable-generic.swift b/test/embedded/init-failable-generic.swift index 9aadef276de..9205ff304b3 100644 --- a/test/embedded/init-failable-generic.swift +++ b/test/embedded/init-failable-generic.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct FooError: Error {} diff --git a/test/embedded/init-failable.swift b/test/embedded/init-failable.swift index bb955747aa1..105b64b2c29 100644 --- a/test/embedded/init-failable.swift +++ b/test/embedded/init-failable.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct FooError: Error {} diff --git a/test/embedded/init-throwing.swift b/test/embedded/init-throwing.swift index 87dc0cc8964..5b33c0a6535 100644 --- a/test/embedded/init-throwing.swift +++ b/test/embedded/init-throwing.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct FooError: Error {} diff --git a/test/embedded/internalize-no-stdlib.swift b/test/embedded/internalize-no-stdlib.swift index 8473d2352d2..caa9469a6af 100644 --- a/test/embedded/internalize-no-stdlib.swift +++ b/test/embedded/internalize-no-stdlib.swift @@ -4,6 +4,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none-macho -wmo | %FileCheck %s --check-prefix CHECK-MACHO // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded struct Bool {} diff --git a/test/embedded/keypath-crash.swift b/test/embedded/keypath-crash.swift index 37badc5a869..44e70b7b932 100644 --- a/test/embedded/keypath-crash.swift +++ b/test/embedded/keypath-crash.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @propertyWrapper @dynamicMemberLookup diff --git a/test/embedded/keypaths.swift b/test/embedded/keypaths.swift index 0b55b877fa2..59d8367cd1f 100644 --- a/test/embedded/keypaths.swift +++ b/test/embedded/keypaths.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded struct MyStruct { var x: Int8 diff --git a/test/embedded/keypaths2.swift b/test/embedded/keypaths2.swift index 7211adafb96..9d1031f714a 100644 --- a/test/embedded/keypaths2.swift +++ b/test/embedded/keypaths2.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @dynamicMemberLookup public struct Box: ~Copyable { diff --git a/test/embedded/keypaths3.swift b/test/embedded/keypaths3.swift index addac00e930..c096feecea6 100644 --- a/test/embedded/keypaths3.swift +++ b/test/embedded/keypaths3.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @dynamicMemberLookup public struct Box: ~Copyable { diff --git a/test/embedded/keypaths4.swift b/test/embedded/keypaths4.swift index 2645cb32b96..e9b989ac562 100644 --- a/test/embedded/keypaths4.swift +++ b/test/embedded/keypaths4.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func foo() { let number = 42 diff --git a/test/embedded/lazy-collections.swift b/test/embedded/lazy-collections.swift index ba979a25fc7..3b6c2d28da6 100644 --- a/test/embedded/lazy-collections.swift +++ b/test/embedded/lazy-collections.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/lto-multiple-object-files.swift b/test/embedded/lto-multiple-object-files.swift index edfec93b1f8..3660355c05f 100644 --- a/test/embedded/lto-multiple-object-files.swift +++ b/test/embedded/lto-multiple-object-files.swift @@ -21,6 +21,7 @@ // ASan cannot work in ("Interceptors are not working, AddressSanitizer is // loaded too late"). // REQUIRES: no_asan +// REQUIRES: swift_feature_Embedded // BEGIN MyFile1.swift diff --git a/test/embedded/lto.swift b/test/embedded/lto.swift index 6c3ccc246ea..1f6e7080d05 100644 --- a/test/embedded/lto.swift +++ b/test/embedded/lto.swift @@ -11,6 +11,8 @@ // ASan cannot work in ("Interceptors are not working, AddressSanitizer is // loaded too late"). // REQUIRES: no_asan +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @_extern(c, "putchar") @discardableResult diff --git a/test/embedded/managed-buffer.swift b/test/embedded/managed-buffer.swift index e66591003d4..0cce5df0977 100644 --- a/test/embedded/managed-buffer.swift +++ b/test/embedded/managed-buffer.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // CHECK: @"$s4main8MyBufferCN" = {{.*global.*}} <{ ptr @"$ss13ManagedBufferCySis5UInt8VGN", ptr @"$s4main8MyBufferCfD{{[^"]*}}", ptr null, ptr @"$s4main8MyBufferC12_doNotCallMeACyt_tcfC{{[^"]*}}" }> // CHECK: @"$ss13ManagedBufferCySis5UInt8VGN" = {{.*global.*}} <{ ptr null, ptr @"$ss13ManagedBufferCfDSi_s5UInt8VTg5{{[^"]*}}", ptr null, ptr @"$ss13ManagedBufferC12_doNotCallMeAByxq_Gyt_tcfCSi_s5UInt8VTg5{{[^"]*}}" }> diff --git a/test/embedded/managed-buffer2.swift b/test/embedded/managed-buffer2.swift index 47230b17a3a..ddb16c3ea7d 100644 --- a/test/embedded/managed-buffer2.swift +++ b/test/embedded/managed-buffer2.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded struct CountAndCapacity { var count: Int diff --git a/test/embedded/metatype-type-hint.swift b/test/embedded/metatype-type-hint.swift index 878c4283bb5..986565f39c0 100644 --- a/test/embedded/metatype-type-hint.swift +++ b/test/embedded/metatype-type-hint.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct AsyncStream2 { var x: Int diff --git a/test/embedded/metatype-type-hint2.swift b/test/embedded/metatype-type-hint2.swift index 596ea5cd575..c055f599674 100644 --- a/test/embedded/metatype-type-hint2.swift +++ b/test/embedded/metatype-type-hint2.swift @@ -8,6 +8,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/metatypes.swift b/test/embedded/metatypes.swift index ecbaabbf0dc..78c769b5e54 100644 --- a/test/embedded/metatypes.swift +++ b/test/embedded/metatypes.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func sink(t: T) {} diff --git a/test/embedded/mirror.swift b/test/embedded/mirror.swift index c0352c20cf7..ba01d25847e 100644 --- a/test/embedded/mirror.swift +++ b/test/embedded/mirror.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct MyStruct { var a, b, c: Int diff --git a/test/embedded/modules-classes.swift b/test/embedded/modules-classes.swift index f1e85e6e652..8ad0b0535b0 100644 --- a/test/embedded/modules-classes.swift +++ b/test/embedded/modules-classes.swift @@ -10,6 +10,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/modules-empty-object.swift b/test/embedded/modules-empty-object.swift index a3d3ad790d6..038f525b865 100644 --- a/test/embedded/modules-empty-object.swift +++ b/test/embedded/modules-empty-object.swift @@ -11,6 +11,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded //--- MyModuleA.swift diff --git a/test/embedded/modules-extern.swift b/test/embedded/modules-extern.swift index 2ab9dab09c0..0bbab7c1196 100644 --- a/test/embedded/modules-extern.swift +++ b/test/embedded/modules-extern.swift @@ -6,6 +6,8 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern // BEGIN MyModule.swift diff --git a/test/embedded/modules-globals-exec.swift b/test/embedded/modules-globals-exec.swift index 9dbe7961d59..4ec9868573d 100644 --- a/test/embedded/modules-globals-exec.swift +++ b/test/embedded/modules-globals-exec.swift @@ -10,6 +10,8 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern // BEGIN MyModule.swift diff --git a/test/embedded/modules-globals-many.swift b/test/embedded/modules-globals-many.swift index a69db755c4b..49f15ac713c 100644 --- a/test/embedded/modules-globals-many.swift +++ b/test/embedded/modules-globals-many.swift @@ -8,6 +8,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // Dependencies look like this: // diff --git a/test/embedded/modules-globals.swift b/test/embedded/modules-globals.swift index a7ae29c8f29..01d73507900 100644 --- a/test/embedded/modules-globals.swift +++ b/test/embedded/modules-globals.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/modules-print-exec.swift b/test/embedded/modules-print-exec.swift index 72ec5043717..e5de6f66def 100644 --- a/test/embedded/modules-print-exec.swift +++ b/test/embedded/modules-print-exec.swift @@ -10,6 +10,8 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern // BEGIN MyModule.swift diff --git a/test/embedded/modules-subclasses.swift b/test/embedded/modules-subclasses.swift index bad953f19ee..28fe02b6aa4 100644 --- a/test/embedded/modules-subclasses.swift +++ b/test/embedded/modules-subclasses.swift @@ -22,6 +22,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/no-allocations-print.swift b/test/embedded/no-allocations-print.swift index ee68ce1425f..b1a06d78b7f 100644 --- a/test/embedded/no-allocations-print.swift +++ b/test/embedded/no-allocations-print.swift @@ -8,6 +8,7 @@ // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded print("Hello Embedded Swift!") print(42) diff --git a/test/embedded/no-allocations.swift b/test/embedded/no-allocations.swift index e9122bf87a8..080b0f8a3af 100644 --- a/test/embedded/no-allocations.swift +++ b/test/embedded/no-allocations.swift @@ -5,6 +5,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public class X {} // expected-error {{cannot use allocating type 'X' in -no-allocations mode}} public func use_a_class() -> X { diff --git a/test/embedded/no-autolink.swift b/test/embedded/no-autolink.swift index c5fb1711456..db4609bbcce 100644 --- a/test/embedded/no-autolink.swift +++ b/test/embedded/no-autolink.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func staticstring() -> StaticString { return "hello" diff --git a/test/embedded/non-copyable-deinit.swift b/test/embedded/non-copyable-deinit.swift index 20106732cef..899a43a9ef0 100644 --- a/test/embedded/non-copyable-deinit.swift +++ b/test/embedded/non-copyable-deinit.swift @@ -2,6 +2,7 @@ // REQUIRES: executable_test // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded var deinitCalled = false diff --git a/test/embedded/noncopyable-captures.swift b/test/embedded/noncopyable-captures.swift index ed408819807..f572d8f12ad 100644 --- a/test/embedded/noncopyable-captures.swift +++ b/test/embedded/noncopyable-captures.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-emit-ir %s -enable-experimental-feature Embedded -wmo -verify // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded struct MyStruct : ~Copyable { var member = "42" diff --git a/test/embedded/objc-with-embedded-diag.swift b/test/embedded/objc-with-embedded-diag.swift index 512d270c03c..130dd6854af 100644 --- a/test/embedded/objc-with-embedded-diag.swift +++ b/test/embedded/objc-with-embedded-diag.swift @@ -5,5 +5,6 @@ // RUN: %target-swift-frontend -parse-stdlib -target arm64-apple-macos11 -emit-ir %s -disable-objc-interop -enable-experimental-feature Embedded // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // CHECK: error: Objective-C interoperability cannot be enabled with embedded Swift. diff --git a/test/embedded/once-dependent.swift b/test/embedded/once-dependent.swift index 396a48e5d45..a28233ef8aa 100644 --- a/test/embedded/once-dependent.swift +++ b/test/embedded/once-dependent.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct MyStructA { static var singleton = MyStructA() diff --git a/test/embedded/once-multithreaded.swift b/test/embedded/once-multithreaded.swift index c403962ba29..28a52c846b1 100644 --- a/test/embedded/once-multithreaded.swift +++ b/test/embedded/once-multithreaded.swift @@ -9,6 +9,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN BridgingHeader.h diff --git a/test/embedded/once.swift b/test/embedded/once.swift index 3a21f9a7ca1..e89cf0fcb47 100644 --- a/test/embedded/once.swift +++ b/test/embedded/once.swift @@ -12,6 +12,7 @@ // ASan cannot work in ("Interceptors are not working, AddressSanitizer is // loaded too late"). // REQUIRES: no_asan +// REQUIRES: swift_feature_Embedded public struct MyStruct { static var singleton = MyStruct() diff --git a/test/embedded/opaque-return-types.swift b/test/embedded/opaque-return-types.swift index 1775e3b3696..a6f288a1306 100644 --- a/test/embedded/opaque-return-types.swift +++ b/test/embedded/opaque-return-types.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: VENDOR=apple // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded protocol Proto { } diff --git a/test/embedded/optionset.swift b/test/embedded/optionset.swift index ba4d3dc700f..d2adf07a108 100644 --- a/test/embedded/optionset.swift +++ b/test/embedded/optionset.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded struct ShippingOptions: OptionSet { let rawValue: Int diff --git a/test/embedded/optionset2.swift b/test/embedded/optionset2.swift index a5f9df7e4f7..bb19e680f98 100644 --- a/test/embedded/optionset2.swift +++ b/test/embedded/optionset2.swift @@ -5,6 +5,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // https://github.com/apple/swift/issues/73249 // UNSUPPORTED: OS=windows-msvc diff --git a/test/embedded/osize-genericspecializer.swift b/test/embedded/osize-genericspecializer.swift index e33eb79f3c1..a3ca15d70ef 100644 --- a/test/embedded/osize-genericspecializer.swift +++ b/test/embedded/osize-genericspecializer.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func foo(n: T) { bar(n: 42) diff --git a/test/embedded/osize-releasedevirt.swift b/test/embedded/osize-releasedevirt.swift index 5403671eeb6..83dfb5b53a8 100644 --- a/test/embedded/osize-releasedevirt.swift +++ b/test/embedded/osize-releasedevirt.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func foo() { bar([42]) diff --git a/test/embedded/ouroboros-bug.swift b/test/embedded/ouroboros-bug.swift index cbbddbdac51..a98be863160 100644 --- a/test/embedded/ouroboros-bug.swift +++ b/test/embedded/ouroboros-bug.swift @@ -10,6 +10,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // https://github.com/apple/swift/issues/73249 // UNSUPPORTED: OS=windows-msvc diff --git a/test/embedded/ptr-auth-irgen-verify-no-stdlib.swift b/test/embedded/ptr-auth-irgen-verify-no-stdlib.swift index 7d3f422b514..da8c9fb23e4 100644 --- a/test/embedded/ptr-auth-irgen-verify-no-stdlib.swift +++ b/test/embedded/ptr-auth-irgen-verify-no-stdlib.swift @@ -1,6 +1,7 @@ // RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -Xcc -fptrauth-calls -module-name Swift | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // Some verification is blocked on string lookup succeeding. struct String {} diff --git a/test/embedded/ptrauth-fieldptr1.swift b/test/embedded/ptrauth-fieldptr1.swift index 0612853cd7b..f6b4a182a96 100644 --- a/test/embedded/ptrauth-fieldptr1.swift +++ b/test/embedded/ptrauth-fieldptr1.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: CPU=arm64e +// REQUIRES: swift_feature_Embedded // BEGIN header.h diff --git a/test/embedded/ptrauth-fieldptr2.swift b/test/embedded/ptrauth-fieldptr2.swift index ee310fa84a0..381179b5a3a 100644 --- a/test/embedded/ptrauth-fieldptr2.swift +++ b/test/embedded/ptrauth-fieldptr2.swift @@ -8,6 +8,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: CPU=arm64e +// REQUIRES: swift_feature_Embedded // BEGIN header.h diff --git a/test/embedded/refcounting-leak.swift b/test/embedded/refcounting-leak.swift index 8b3b513c360..371226dae42 100644 --- a/test/embedded/refcounting-leak.swift +++ b/test/embedded/refcounting-leak.swift @@ -8,6 +8,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded var x: UInt = 1 func randomNumber() -> UInt { diff --git a/test/embedded/runtime-release.swift b/test/embedded/runtime-release.swift index b8899ab696d..c1fb75646fc 100644 --- a/test/embedded/runtime-release.swift +++ b/test/embedded/runtime-release.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/runtime.swift b/test/embedded/runtime.swift index bba83252cdc..4c0668281b4 100644 --- a/test/embedded/runtime.swift +++ b/test/embedded/runtime.swift @@ -6,6 +6,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @_extern(c, "putchar") @discardableResult diff --git a/test/embedded/sensitive.swift b/test/embedded/sensitive.swift index d2b09579c68..4e895f3ee52 100644 --- a/test/embedded/sensitive.swift +++ b/test/embedded/sensitive.swift @@ -6,6 +6,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Sensitive var checkBuffer: UnsafeBufferPointer? diff --git a/test/embedded/set-runtime.swift b/test/embedded/set-runtime.swift index 90fd764899a..54dc96086bc 100644 --- a/test/embedded/set-runtime.swift +++ b/test/embedded/set-runtime.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/shared-linkage.swift b/test/embedded/shared-linkage.swift index b7de4bed17a..8d38ea50ea3 100644 --- a/test/embedded/shared-linkage.swift +++ b/test/embedded/shared-linkage.swift @@ -12,6 +12,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN Module.swift diff --git a/test/embedded/simd.swift b/test/embedded/simd.swift index cd3002f66af..a83183347ef 100644 --- a/test/embedded/simd.swift +++ b/test/embedded/simd.swift @@ -8,6 +8,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @inline(never) public func sum(_ v: SIMD4) -> Float { diff --git a/test/embedded/specialize-attrs.swift b/test/embedded/specialize-attrs.swift index 038db2c8186..a5b357d7186 100644 --- a/test/embedded/specialize-attrs.swift +++ b/test/embedded/specialize-attrs.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded @_semantics("optimize.sil.specialize.generic.never") func foo(_ t: T) -> Int { diff --git a/test/embedded/specialize-attrs2.swift b/test/embedded/specialize-attrs2.swift index 653b92fab5d..54abc73fcc2 100644 --- a/test/embedded/specialize-attrs2.swift +++ b/test/embedded/specialize-attrs2.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/specialize-opt-none.swift b/test/embedded/specialize-opt-none.swift index 463e81e41b5..d94c35da627 100644 --- a/test/embedded/specialize-opt-none.swift +++ b/test/embedded/specialize-opt-none.swift @@ -2,6 +2,7 @@ // RUN: %target-swift-emit-sil %s -parse-stdlib -O -enable-experimental-feature Embedded | %FileCheck %s --check-prefix EMBEDDED // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded struct X {} diff --git a/test/embedded/static-object-non-darwin.swift b/test/embedded/static-object-non-darwin.swift index 9b7f5822945..bf0c65ed81d 100644 --- a/test/embedded/static-object-non-darwin.swift +++ b/test/embedded/static-object-non-darwin.swift @@ -6,6 +6,7 @@ // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded let pots = [41,52,99,1,4,4] diff --git a/test/embedded/static-object.swift b/test/embedded/static-object.swift index cd1b7450fa2..b6b1e106e76 100644 --- a/test/embedded/static-object.swift +++ b/test/embedded/static-object.swift @@ -22,6 +22,7 @@ // Currently, constant static arrays only work on Darwin platforms. // REQUIRES: VENDOR=apple +// REQUIRES: swift_feature_Embedded public struct Str { diff --git a/test/embedded/static-string-interpolation.swift b/test/embedded/static-string-interpolation.swift index 41da8041382..27d8f6bf070 100644 --- a/test/embedded/static-string-interpolation.swift +++ b/test/embedded/static-string-interpolation.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public struct MyInterpolation : StringInterpolationProtocol { public typealias StringLiteralType = StaticString diff --git a/test/embedded/stdlib-array.swift b/test/embedded/stdlib-array.swift index 52c24b36bfa..1956186a8ac 100644 --- a/test/embedded/stdlib-array.swift +++ b/test/embedded/stdlib-array.swift @@ -5,6 +5,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // https://github.com/apple/swift/issues/73249 // UNSUPPORTED: OS=windows-msvc diff --git a/test/embedded/stdlib-basic.swift b/test/embedded/stdlib-basic.swift index 4c82a31d6c9..f5296eef65c 100644 --- a/test/embedded/stdlib-basic.swift +++ b/test/embedded/stdlib-basic.swift @@ -4,6 +4,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // https://github.com/apple/swift/issues/73249 // UNSUPPORTED: OS=windows-msvc diff --git a/test/embedded/stdlib-dictionary.swift b/test/embedded/stdlib-dictionary.swift index 1849906285e..1942b5a26ae 100644 --- a/test/embedded/stdlib-dictionary.swift +++ b/test/embedded/stdlib-dictionary.swift @@ -4,6 +4,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // https://github.com/apple/swift/issues/73249 // UNSUPPORTED: OS=windows-msvc diff --git a/test/embedded/stdlib-random.swift b/test/embedded/stdlib-random.swift index 677f51b234f..e10836109cf 100644 --- a/test/embedded/stdlib-random.swift +++ b/test/embedded/stdlib-random.swift @@ -4,6 +4,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // https://github.com/apple/swift/issues/73249 // UNSUPPORTED: OS=windows-msvc diff --git a/test/embedded/stdlib-set.swift b/test/embedded/stdlib-set.swift index bed9cabe5af..533929bd922 100644 --- a/test/embedded/stdlib-set.swift +++ b/test/embedded/stdlib-set.swift @@ -5,6 +5,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // https://github.com/apple/swift/issues/73249 // UNSUPPORTED: OS=windows-msvc diff --git a/test/embedded/stdlib-strings-append.swift b/test/embedded/stdlib-strings-append.swift index 0da56184b83..0370d822fb1 100644 --- a/test/embedded/stdlib-strings-append.swift +++ b/test/embedded/stdlib-strings-append.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/stdlib-strings-datatables.swift b/test/embedded/stdlib-strings-datatables.swift index 71eb3cc19f9..a26a8419188 100644 --- a/test/embedded/stdlib-strings-datatables.swift +++ b/test/embedded/stdlib-strings-datatables.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded public func test1() { let string = "string" diff --git a/test/embedded/stdlib-strings-interpolation.swift b/test/embedded/stdlib-strings-interpolation.swift index abe7df6d69f..4cf4a173f96 100644 --- a/test/embedded/stdlib-strings-interpolation.swift +++ b/test/embedded/stdlib-strings-interpolation.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/stdlib-strings-interpolation2.swift b/test/embedded/stdlib-strings-interpolation2.swift index 23623e0654a..47dd6535d3d 100644 --- a/test/embedded/stdlib-strings-interpolation2.swift +++ b/test/embedded/stdlib-strings-interpolation2.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded struct Event { var id: String diff --git a/test/embedded/stdlib-strings-interpolation3.swift b/test/embedded/stdlib-strings-interpolation3.swift index eed6576b7dd..5962326079e 100644 --- a/test/embedded/stdlib-strings-interpolation3.swift +++ b/test/embedded/stdlib-strings-interpolation3.swift @@ -6,6 +6,7 @@ // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/stdlib-strings-osize.swift b/test/embedded/stdlib-strings-osize.swift index 64fc12d9ff8..fc3d16512ab 100644 --- a/test/embedded/stdlib-strings-osize.swift +++ b/test/embedded/stdlib-strings-osize.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/stdlib-strings-print.swift b/test/embedded/stdlib-strings-print.swift index 5c429672b2d..0a5fcc77341 100644 --- a/test/embedded/stdlib-strings-print.swift +++ b/test/embedded/stdlib-strings-print.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/stdlib-strings-unicode.swift b/test/embedded/stdlib-strings-unicode.swift index 789e4b0f82e..cbad9eb2460 100644 --- a/test/embedded/stdlib-strings-unicode.swift +++ b/test/embedded/stdlib-strings-unicode.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/stdlib-types-riscv.swift b/test/embedded/stdlib-types-riscv.swift index 43234c255d3..0d4bdacf069 100644 --- a/test/embedded/stdlib-types-riscv.swift +++ b/test/embedded/stdlib-types-riscv.swift @@ -5,6 +5,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: CODEGENERATOR=RISCV // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded class MyClass {} diff --git a/test/embedded/stdlib-types.swift b/test/embedded/stdlib-types.swift index cb2656bdebc..74fb85b88f7 100644 --- a/test/embedded/stdlib-types.swift +++ b/test/embedded/stdlib-types.swift @@ -5,6 +5,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: CODEGENERATOR=ARM // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded // https://github.com/apple/swift/issues/73249 // UNSUPPORTED: OS=windows-msvc diff --git a/test/embedded/string-interpolation-types.swift b/test/embedded/string-interpolation-types.swift index 915c0a19fe1..c223d7bd282 100644 --- a/test/embedded/string-interpolation-types.swift +++ b/test/embedded/string-interpolation-types.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/string-switch.swift b/test/embedded/string-switch.swift index a9dda75833f..c50cd77510b 100644 --- a/test/embedded/string-switch.swift +++ b/test/embedded/string-switch.swift @@ -4,6 +4,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded enum MyEnum: String { case foo diff --git a/test/embedded/string-to-pointer.swift b/test/embedded/string-to-pointer.swift index 3733a80902d..4601138114d 100644 --- a/test/embedded/string-to-pointer.swift +++ b/test/embedded/string-to-pointer.swift @@ -4,6 +4,8 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @_extern(c) func puts(_ string: UnsafePointer?) -> CInt diff --git a/test/embedded/synchronization.swift b/test/embedded/synchronization.swift index 6ce3422f6df..f1d6693025d 100644 --- a/test/embedded/synchronization.swift +++ b/test/embedded/synchronization.swift @@ -8,6 +8,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: synchronization +// REQUIRES: swift_feature_Embedded import Synchronization diff --git a/test/embedded/throw-trap-stdlib.swift b/test/embedded/throw-trap-stdlib.swift index 4f9584da71a..80dae570288 100644 --- a/test/embedded/throw-trap-stdlib.swift +++ b/test/embedded/throw-trap-stdlib.swift @@ -2,6 +2,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func test() { withUnsafeTemporaryAllocation(byteCount: MemoryLayout.size, alignment: MemoryLayout.alignment) { p in diff --git a/test/embedded/throw-trap.swift b/test/embedded/throw-trap.swift index f4135b5fb8e..fb946e372dc 100644 --- a/test/embedded/throw-trap.swift +++ b/test/embedded/throw-trap.swift @@ -4,6 +4,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded enum MyError : Error { case a diff --git a/test/embedded/throw-typed.swift b/test/embedded/throw-typed.swift index e7e67e35dbb..bbe8f52c5e3 100644 --- a/test/embedded/throw-typed.swift +++ b/test/embedded/throw-typed.swift @@ -6,6 +6,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public enum MyError : Error, Equatable { case a diff --git a/test/embedded/traps-fatalerror-exec.swift b/test/embedded/traps-fatalerror-exec.swift index 3573088ab43..f896c8d8608 100644 --- a/test/embedded/traps-fatalerror-exec.swift +++ b/test/embedded/traps-fatalerror-exec.swift @@ -21,6 +21,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: swift_test_mode_optimize_none +// REQUIRES: swift_feature_Embedded func test() { fatalError("task failed successfully") diff --git a/test/embedded/traps-fatalerror-ir.swift b/test/embedded/traps-fatalerror-ir.swift index 8563bf28da8..56108054387 100644 --- a/test/embedded/traps-fatalerror-ir.swift +++ b/test/embedded/traps-fatalerror-ir.swift @@ -7,6 +7,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func test() { fatalError("task failed successfully") diff --git a/test/embedded/traps-multiple-preconditions-ir.swift b/test/embedded/traps-multiple-preconditions-ir.swift index 7e942b23358..7bcbda9f282 100644 --- a/test/embedded/traps-multiple-preconditions-ir.swift +++ b/test/embedded/traps-multiple-preconditions-ir.swift @@ -6,6 +6,8 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern @_extern(c) public func external() diff --git a/test/embedded/traps-precondition-exec.swift b/test/embedded/traps-precondition-exec.swift index 347cd59bbe4..3e0f32f352b 100644 --- a/test/embedded/traps-precondition-exec.swift +++ b/test/embedded/traps-precondition-exec.swift @@ -21,6 +21,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: swift_test_mode_optimize_none +// REQUIRES: swift_feature_Embedded func test(i: Int) { precondition(i == 0, "task failed successfully") diff --git a/test/embedded/traps-preconditionfailure-exec.swift b/test/embedded/traps-preconditionfailure-exec.swift index b986493c1e2..45fe6ccb324 100644 --- a/test/embedded/traps-preconditionfailure-exec.swift +++ b/test/embedded/traps-preconditionfailure-exec.swift @@ -21,6 +21,7 @@ // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: swift_test_mode_optimize_none +// REQUIRES: swift_feature_Embedded func test() { preconditionFailure("task failed successfully") diff --git a/test/embedded/traps-unique.swift b/test/embedded/traps-unique.swift index 41239f334fc..6dc2160c5ed 100644 --- a/test/embedded/traps-unique.swift +++ b/test/embedded/traps-unique.swift @@ -5,6 +5,7 @@ // REQUIRES: executable_test // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func foobar(i: Int) { if i == 1 { _assertionFailure("prefix", "message 1", file: "", line: 0, flags: 0) } diff --git a/test/embedded/typeof.swift b/test/embedded/typeof.swift index 4aa3a6379ea..7f6a1329ed4 100644 --- a/test/embedded/typeof.swift +++ b/test/embedded/typeof.swift @@ -3,6 +3,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public func unsafeWriteArray(_ elementType: R.Type, array: inout T, index n: Int, value: R) { precondition(_isPOD(elementType)) diff --git a/test/embedded/unicode-dead-strip1.swift b/test/embedded/unicode-dead-strip1.swift index f92a0dbc42e..c8bb80b3470 100644 --- a/test/embedded/unicode-dead-strip1.swift +++ b/test/embedded/unicode-dead-strip1.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/unicode-dead-strip2.swift b/test/embedded/unicode-dead-strip2.swift index 74cd0949146..cd45eec5f71 100644 --- a/test/embedded/unicode-dead-strip2.swift +++ b/test/embedded/unicode-dead-strip2.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/unicode-dead-strip3.swift b/test/embedded/unicode-dead-strip3.swift index 70f311bad45..40992ce1117 100644 --- a/test/embedded/unicode-dead-strip3.swift +++ b/test/embedded/unicode-dead-strip3.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx +// REQUIRES: swift_feature_Embedded @main struct Main { diff --git a/test/embedded/value-type-deinits.swift b/test/embedded/value-type-deinits.swift index ea4d32d8c68..e3ace93454d 100644 --- a/test/embedded/value-type-deinits.swift +++ b/test/embedded/value-type-deinits.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded // BEGIN MyModule.swift diff --git a/test/embedded/volatile-exec.swift b/test/embedded/volatile-exec.swift index e4d71bf965e..e5bfd21297d 100644 --- a/test/embedded/volatile-exec.swift +++ b/test/embedded/volatile-exec.swift @@ -5,6 +5,8 @@ // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: volatile +// REQUIRES: swift_feature_Embedded +// REQUIRES: swift_feature_Extern import _Volatile diff --git a/test/embedded/volatile-ir.swift b/test/embedded/volatile-ir.swift index 9beb5c16582..c2c31051b28 100644 --- a/test/embedded/volatile-ir.swift +++ b/test/embedded/volatile-ir.swift @@ -6,6 +6,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx || OS=linux-gnu // REQUIRES: volatile +// REQUIRES: swift_feature_Embedded import _Volatile diff --git a/test/embedded/wasm/classes.swift b/test/embedded/wasm/classes.swift index 2798b6a2d29..14c58700c44 100644 --- a/test/embedded/wasm/classes.swift +++ b/test/embedded/wasm/classes.swift @@ -8,6 +8,7 @@ // REQUIRES: executable_test // REQUIRES: CPU=wasm32 // REQUIRES: embedded_stdlib_cross_compiling +// REQUIRES: swift_feature_Embedded //--- rt.c diff --git a/test/embedded/weak-unowned.swift b/test/embedded/weak-unowned.swift index 8bc7ffcc858..9700b1df6cf 100644 --- a/test/embedded/weak-unowned.swift +++ b/test/embedded/weak-unowned.swift @@ -4,6 +4,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded public class MyClass { } diff --git a/test/embedded/wmo-with-embedded-diag.swift b/test/embedded/wmo-with-embedded-diag.swift index c76a1d34159..e48638d264e 100644 --- a/test/embedded/wmo-with-embedded-diag.swift +++ b/test/embedded/wmo-with-embedded-diag.swift @@ -5,5 +5,6 @@ // RUN: not %target-swiftc_driver -c %s -o %t -module-name wmowithembedded -parse-stdlib -Xfrontend -disable-objc-interop -enable-experimental-feature Embedded 2>&1 | %FileCheck %s // REQUIRES: swift_in_compiler +// REQUIRES: swift_feature_Embedded // CHECK: error: Whole module optimization (wmo) must be enabled with embedded Swift. diff --git a/test/expr/unary/do_expr.swift b/test/expr/unary/do_expr.swift index a429b562e5a..108d6e432ee 100644 --- a/test/expr/unary/do_expr.swift +++ b/test/expr/unary/do_expr.swift @@ -1,7 +1,7 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature ThenStatements -enable-experimental-feature DoExpressions -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_DoExpressions +// REQUIRES: swift_feature_ThenStatements @discardableResult func throwsError() throws -> Int { 0 } diff --git a/test/expr/unary/do_expr_implicit_last_expr.swift b/test/expr/unary/do_expr_implicit_last_expr.swift index a6f4dce373a..dca70b5f117 100644 --- a/test/expr/unary/do_expr_implicit_last_expr.swift +++ b/test/expr/unary/do_expr_implicit_last_expr.swift @@ -1,8 +1,8 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature DoExpressions -enable-experimental-feature ImplicitLastExprResults // RUN: %target-swift-emit-ir -enable-experimental-feature DoExpressions -enable-experimental-feature ImplicitLastExprResults %s -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_DoExpressions +// REQUIRES: swift_feature_ImplicitLastExprResults let a = do { print("hello") diff --git a/test/expr/unary/keypath/keypath.swift b/test/expr/unary/keypath/keypath.swift index c38204fc6df..dd695bf80c1 100644 --- a/test/expr/unary/keypath/keypath.swift +++ b/test/expr/unary/keypath/keypath.swift @@ -1,6 +1,6 @@ // RUN: %target-swift-frontend -typecheck -parse-as-library %s -verify -// REQUIRES: asserts +// REQUIRES: swift_feature_KeyPathWithStaticMembers struct Sub: Hashable { static func ==(_: Sub, _: Sub) -> Bool { return true } @@ -229,8 +229,8 @@ func testKeyPathInGenericContext(hashable: H, anything: X) { } func testDisembodiedStringInterpolation(x: Int) { - \(x) // expected-error{{string interpolation can only appear inside a string literal}} - \(x, radix: 16) // expected-error{{string interpolation can only appear inside a string literal}} + \(x) // expected-error{{string interpolation can only appear inside a string literal}} + \(x, radix: 16) // expected-error{{string interpolation can only appear inside a string literal}} } func testNoComponents() { @@ -556,7 +556,7 @@ func testStaticKeyPathComponent() { let _: KeyPath = \.e?.h let _: PartialKeyPath = \.e?.h let _: AnyKeyPath = \X.e?.h - + let _ : KeyPath = \Y.[40] let _ : KeyPath = \Y.Type.[70] } @@ -940,7 +940,7 @@ func testKeyPathHole() { _ = \.x // expected-error {{cannot infer key path type from context; consider explicitly specifying a root type}} {{8-8=<#Root#>}} _ = \.x.y // expected-error {{cannot infer key path type from context; consider explicitly specifying a root type}} {{8-8=<#Root#>}} - let _ : AnyKeyPath = \.x + let _ : AnyKeyPath = \.x // expected-error@-1 {{'AnyKeyPath' does not provide enough context for root type to be inferred; consider explicitly specifying a root type}} {{25-25=<#Root#>}} let _ : AnyKeyPath = \.x.y // expected-error@-1 {{'AnyKeyPath' does not provide enough context for root type to be inferred; consider explicitly specifying a root type}} {{25-25=<#Root#>}} @@ -956,7 +956,7 @@ func provideValueButNotRoot(_ fn: (T) -> String) {} // expected-note 2 {{in c // expected-error@-1 {{generic parameter 'T' could not be inferred}} provideValueButNotRoot(\String.foo) // expected-error {{value of type 'String' has no member 'foo'}} - func provideKPValueButNotRoot(_ kp: KeyPath) {} + func provideKPValueButNotRoot(_ kp: KeyPath) {} provideKPValueButNotRoot(\.x) // expected-error {{cannot infer key path type from context; consider explicitly specifying a root type}} provideKPValueButNotRoot(\.x.y) // expected-error {{cannot infer key path type from context; consider explicitly specifying a root type}} @@ -1026,11 +1026,11 @@ func testMemberAccessOnOptionalKeyPathComponent() { } } - \String?.count + \String?.count // expected-error@-1 {{value of optional type 'String?' must be unwrapped to refer to member 'count' of wrapped base type 'String'}} // expected-note@-2 {{use unwrapped type 'String' as key path root}} {{4-11=String}} - - \Optional.count + + \Optional.count // expected-error@-1 {{value of optional type 'Optional' must be unwrapped to refer to member 'count' of wrapped base type 'String'}} // expected-note@-2 {{use unwrapped type 'String' as key path root}} {{4-20=String}} @@ -1053,7 +1053,7 @@ func testMemberAccessOnOptionalKeyPathComponent() { kp(\.count) // expected-error {{key path root inferred as optional type 'String?' must be unwrapped to refer to member 'count' of unwrapped type 'String'}} let _ : KeyPath = \.count // expected-error {{key path root inferred as optional type 'String?' must be unwrapped to refer to member 'count' of unwrapped type 'String'}} - let _ : KeyPath = \.utf8.count + let _ : KeyPath = \.utf8.count // expected-error@-1 {{key path root inferred as optional type 'String?' must be unwrapped to refer to member 'utf8' of unwrapped type 'String'}} } diff --git a/test/sil-opt/upcoming-feature.sil b/test/sil-opt/upcoming-feature.sil index ceb70d725b2..3d7e7f5449b 100644 --- a/test/sil-opt/upcoming-feature.sil +++ b/test/sil-opt/upcoming-feature.sil @@ -1,5 +1,7 @@ // RUN: not %target-sil-opt %s -enable-upcoming-feature RegionBasedIsolation -swift-version 6 2>&1 | %FileCheck %s +// REQUIRES: swift_feature_RegionBasedIsolation + // READ THIS: This test makes sure that we error if an upcoming feature is // enabled in a language mode where it is enabled by default. diff --git a/test/stdlib/Observation/Observable.swift b/test/stdlib/Observation/Observable.swift index 06dbd24137e..2ee70c1dfce 100644 --- a/test/stdlib/Observation/Observable.swift +++ b/test/stdlib/Observation/Observable.swift @@ -8,6 +8,7 @@ // REQUIRES: observation // REQUIRES: concurrency // REQUIRES: objc_interop +// REQUIRES: swift_feature_Macros // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/stdlib/Observation/ObservableDiagnostics.swift b/test/stdlib/Observation/ObservableDiagnostics.swift index 43f9f303451..fb4c859b073 100644 --- a/test/stdlib/Observation/ObservableDiagnostics.swift +++ b/test/stdlib/Observation/ObservableDiagnostics.swift @@ -8,6 +8,7 @@ // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime // REQUIRES: rdar112623492 +// REQUIRES: swift_feature_Macros import Observation diff --git a/test/stdlib/Observation/ObservableDidSetWillSet.swift b/test/stdlib/Observation/ObservableDidSetWillSet.swift index 85c53f71448..2981ae8a3b3 100644 --- a/test/stdlib/Observation/ObservableDidSetWillSet.swift +++ b/test/stdlib/Observation/ObservableDidSetWillSet.swift @@ -5,6 +5,7 @@ // REQUIRES: observation // REQUIRES: concurrency // REQUIRES: objc_interop +// REQUIRES: swift_feature_Macros // UNSUPPORTED: use_os_stdlib // UNSUPPORTED: back_deployment_runtime diff --git a/test/stdlib/Runtime.swift.gyb b/test/stdlib/Runtime.swift.gyb index a358221f00a..7846a5bc491 100644 --- a/test/stdlib/Runtime.swift.gyb +++ b/test/stdlib/Runtime.swift.gyb @@ -6,6 +6,7 @@ // RUN: %target-run %t.out // REQUIRES: executable_test // REQUIRES: reflection +// REQUIRES: swift_feature_Extern import Swift import StdlibUnittest diff --git a/test/stdlib/move_function.swift b/test/stdlib/move_function.swift index c5ebb09249f..1c2bf5ca440 100644 --- a/test/stdlib/move_function.swift +++ b/test/stdlib/move_function.swift @@ -1,6 +1,7 @@ // RUN: %target-run-stdlib-swift(-O -enable-experimental-feature MoveOnly) // REQUIRES: executable_test +// REQUIRES: swift_feature_MoveOnly import Swift import StdlibUnittest diff --git a/test/stmt/print/then_stmt.swift b/test/stmt/print/then_stmt.swift index 9d9676818d5..0302541817b 100644 --- a/test/stmt/print/then_stmt.swift +++ b/test/stmt/print/then_stmt.swift @@ -1,7 +1,6 @@ // RUN: %target-swift-frontend -print-ast -enable-experimental-feature ThenStatements %s 2>&1 | %FileCheck %s -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_ThenStatements func foo() -> Int { if .random() { diff --git a/test/stmt/then_stmt.swift b/test/stmt/then_stmt.swift index ec531f99fff..6f372ae9e86 100644 --- a/test/stmt/then_stmt.swift +++ b/test/stmt/then_stmt.swift @@ -1,10 +1,8 @@ // RUN: %target-typecheck-verify-swift -enable-bare-slash-regex -disable-availability-checking -enable-experimental-feature ThenStatements -// Required for experimental features -// REQUIRES: asserts - // Required for regex // REQUIRES: swift_swift_parser +// REQUIRES: swift_feature_ThenStatements func then(_: Int = 0, x: Int = 0, fn: () -> Void = {}) {} diff --git a/test/stmt/then_stmt_exec.swift b/test/stmt/then_stmt_exec.swift index 76fbf1ecf56..54dc1dcad04 100644 --- a/test/stmt/then_stmt_exec.swift +++ b/test/stmt/then_stmt_exec.swift @@ -4,9 +4,7 @@ // RUN: %target-run %t/a.out | %FileCheck %s // REQUIRES: executable_test - -// Required for experimental features -// REQUIRES: asserts +// REQUIRES: swift_feature_ThenStatements func testDeferIf(_ x: Bool) -> Int { defer { diff --git a/test/stmt/typed_throws.swift b/test/stmt/typed_throws.swift index ecc4c04bd39..30d38b2b53e 100644 --- a/test/stmt/typed_throws.swift +++ b/test/stmt/typed_throws.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -enable-experimental-feature FullTypedThrows -// REQUIRES: asserts +// REQUIRES: swift_feature_FullTypedThrows enum MyError: Error { case failed diff --git a/test/type/explicit_existential.swift b/test/type/explicit_existential.swift index 5b9e6e9035d..7a41b600a1d 100644 --- a/test/type/explicit_existential.swift +++ b/test/type/explicit_existential.swift @@ -3,6 +3,8 @@ // RUN: %target-typecheck-verify-swift -enable-upcoming-feature ExistentialAny -verify-additional-prefix explicit-any- -verify-additional-prefix default-swift-mode- // RUN: %target-typecheck-verify-swift -enable-experimental-feature ExistentialAny -verify-additional-prefix explicit-any- -verify-additional-prefix default-swift-mode- +// REQUIRES: swift_feature_ExistentialAny + protocol HasSelfRequirements { func foo(_ x: Self) diff --git a/test/type/explicit_existential_multimodule1.swift b/test/type/explicit_existential_multimodule1.swift index 2696dacdf8f..3cdd70d9937 100644 --- a/test/type/explicit_existential_multimodule1.swift +++ b/test/type/explicit_existential_multimodule1.swift @@ -2,6 +2,8 @@ // RUN: %target-swift-frontend %s -swift-version 5 -emit-module -DM -module-name M -emit-module-path %t/M.swiftmodule -enable-upcoming-feature ExistentialAny // RUN: %target-swift-frontend %s -verify -swift-version 5 -typecheck -I %t +// REQUIRES: swift_feature_ExistentialAny + // Test that the feature state used to compile a module is not reflected in // the module file. The feature must not be enforced on protocols originating in // a different module just because that module was compiled with the feature diff --git a/test/type/explicit_existential_multimodule2.swift b/test/type/explicit_existential_multimodule2.swift index 09038de3eba..7d43479557b 100644 --- a/test/type/explicit_existential_multimodule2.swift +++ b/test/type/explicit_existential_multimodule2.swift @@ -2,6 +2,8 @@ // RUN: %target-swift-frontend %s -swift-version 5 -emit-module -DM -module-name M -emit-module-path %t/M.swiftmodule // RUN: %target-swift-frontend %s -verify -swift-version 5 -typecheck -I %t -enable-upcoming-feature ExistentialAny +// REQUIRES: swift_feature_ExistentialAny + // Test that a protocol that requires 'any' *only* when the feature is enabled // is diagnosed as expected when said protocol originates in a different module. // In other words, test that deserialization does not affect 'any' migration diff --git a/test/type/implicit_some/explicit_existential.swift b/test/type/implicit_some/explicit_existential.swift index c1e644fc93f..f830cfa0699 100644 --- a/test/type/implicit_some/explicit_existential.swift +++ b/test/type/implicit_some/explicit_existential.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature ImplicitSome -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitSome protocol Foo { } diff --git a/test/type/implicit_some/opaque_parameters.swift b/test/type/implicit_some/opaque_parameters.swift index 7505a99f9d0..999352133fa 100644 --- a/test/type/implicit_some/opaque_parameters.swift +++ b/test/type/implicit_some/opaque_parameters.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature ImplicitSome -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitSome protocol P { } diff --git a/test/type/implicit_some/opaque_return.swift b/test/type/implicit_some/opaque_return.swift index 5bc95166f27..52561b1b80a 100644 --- a/test/type/implicit_some/opaque_return.swift +++ b/test/type/implicit_some/opaque_return.swift @@ -1,6 +1,6 @@ // RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature ImplicitSome -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitSome protocol Eatery { func lunch() diff --git a/test/type/opaque_parameterized_existential.swift b/test/type/opaque_parameterized_existential.swift index 80e64c1cfc4..62e186ba2c2 100644 --- a/test/type/opaque_parameterized_existential.swift +++ b/test/type/opaque_parameterized_existential.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-frontend -disable-availability-checking -typecheck -verify %s // RUN: %target-swift-frontend -disable-availability-checking -enable-experimental-feature ImplicitSome -typecheck -verify %s -// REQUIRES: asserts +// REQUIRES: swift_feature_ImplicitSome // I do not like nested some type params, // I do not like them Σam-i-am diff --git a/validation-test/IRGen/rdar127535274.swift b/validation-test/IRGen/rdar127535274.swift index 0fac2e42c3d..8fcbd436597 100644 --- a/validation-test/IRGen/rdar127535274.swift +++ b/validation-test/IRGen/rdar127535274.swift @@ -1,5 +1,8 @@ // RUN: %target-build-swift -g -Xfrontend -enable-experimental-feature -Xfrontend LayoutStringValueWitnesses -Xfrontend -enable-experimental-feature -Xfrontend LayoutStringValueWitnessesInstantiation -Xfrontend -enable-layout-string-value-witnesses -Xfrontend -enable-layout-string-value-witnesses-instantiation -Xfrontend -enable-library-evolution -c -parse-as-library -emit-ir %s | %FileCheck %s +// REQUIRES: swift_feature_LayoutStringValueWitnesses +// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation + // CHECK: define internal ptr @"$s13rdar1275352744TestVMi" // CHECK: [[METADATA:%.*]] = call ptr @swift_allocateGenericValueMetadataWithLayoutString // CHECK: call void @swift_generic_instantiateLayoutString(ptr @"type_layout_string l13rdar1275352744TestVyxG", ptr [[METADATA]]) diff --git a/validation-test/embedded/rdar126965232.swift b/validation-test/embedded/rdar126965232.swift index ea8d45d7acd..927cd41dd11 100644 --- a/validation-test/embedded/rdar126965232.swift +++ b/validation-test/embedded/rdar126965232.swift @@ -10,6 +10,7 @@ // REQUIRES: swift_in_compiler // REQUIRES: optimized_stdlib // REQUIRES: OS=macosx || OS=linux-gnu +// REQUIRES: swift_feature_Embedded class MyClass { var x: Int? = nil