Skip to content

Commit 24a38fc

Browse files
authored
[Concurrency] Verify the #if guards around moveonly Job (#64477)
1 parent eb895e7 commit 24a38fc

9 files changed

+19
-5
lines changed

lib/Sema/TypeCheckConcurrency.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,6 @@ void swift::tryDiagnoseExecutorConformance(ASTContext &C,
12481248
if (funcDecl->getName() != enqueueDeclName)
12491249
continue;
12501250

1251-
12521251
// look for the first parameter being a Job or UnownedJob
12531252
if (funcDecl->getParameters()->size() != 1)
12541253
continue;

test/Concurrency/Runtime/custom_executors.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-run-simple-swift( -Xfrontend -enable-experimental-move-only -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s --dump-input=always
1+
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s --dump-input=always
22

33
// REQUIRES: concurrency
44
// REQUIRES: executable_test

test/Concurrency/Runtime/custom_executors_default.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
// RUN: %target-run-simple-swift( -Xfrontend -enable-experimental-move-only -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s
1+
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s
22

33
// REQUIRES: concurrency
44
// REQUIRES: executable_test
5+
6+
// rdar://106849189 move-only types should be supported in freestanding mode
57
// UNSUPPORTED: freestanding
68

79
// UNSUPPORTED: back_deployment_runtime

test/Concurrency/Runtime/custom_executors_moveOnly_job.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
// RUN: %target-run-simple-swift( -Xfrontend -enable-experimental-move-only -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s
1+
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s
22

33
// REQUIRES: concurrency
44
// REQUIRES: executable_test
5+
6+
// rdar://106849189 move-only types should be supported in freestanding mode
57
// UNSUPPORTED: freestanding
68

79
// UNSUPPORTED: back_deployment_runtime

test/Concurrency/Runtime/custom_executors_priority.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
// RUN: %target-run-simple-swift( -Xfrontend -enable-experimental-move-only -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s --dump-input=always
1+
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library) | %FileCheck %s --dump-input=always
22

33
// REQUIRES: concurrency
44
// REQUIRES: executable_test
5+
6+
// rdar://106849189 move-only types should be supported in freestanding mode
57
// UNSUPPORTED: freestanding
68

79
// UNSUPPORTED: back_deployment_runtime

test/Concurrency/Runtime/custom_executors_protocol.swift

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// REQUIRES: concurrency
44
// REQUIRES: executable_test
55
// REQUIRES: libdispatch
6+
7+
// rdar://106849189 move-only types should be supported in freestanding mode
68
// UNSUPPORTED: freestanding
79

810
// UNSUPPORTED: back_deployment_runtime

test/Concurrency/Runtime/exclusivity_custom_executors.swift

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
// REQUIRES: concurrency
44
// REQUIRES: executable_test
5+
6+
// rdar://106849189 move-only types should be supported in freestanding mode
57
// UNSUPPORTED: freestanding
68

79
// rdar://76038845

test/Concurrency/custom_executor_enqueue_impls.swift

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %target-typecheck-verify-swift -enable-experimental-move-only -disable-availability-checking
22
// REQUIRES: concurrency
33

4+
// rdar://106849189 move-only types should be supported in freestanding mode
5+
// UNSUPPORTED: freestanding
6+
47
// Such type may be encountered since Swift 5.5 (5.1 backdeployed) if someone implemented the
58
// not documented, but public Executor types back then already.
69
//

test/IRGen/async/builtin_executor.sil

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %target-swift-frontend -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all | %IRGenFileCheck %s
22

33
// REQUIRES: concurrency
4+
// rdar://106849189 move-only types should be supported in freestanding mode
5+
// UNSUPPORTED: freestanding
46

57
sil_stage canonical
68

0 commit comments

Comments
 (0)