Skip to content

Commit df2924e

Browse files
authored
Merge pull request swiftlang#34068 from brentdax/technically-its-more-of-a-concurrency-experiment
Emit -enable-experimental-concurrency into module interfaces
2 parents 485467e + 0a94737 commit df2924e

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

include/swift/Option/FrontendOptions.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ def disable_objc_attr_requires_foundation_module :
202202
HelpText<"Disable requiring uses of @objc to require importing the "
203203
"Foundation module">;
204204

205+
def enable_experimental_concurrency :
206+
Flag<["-"], "enable-experimental-concurrency">,
207+
HelpText<"Enable experimental concurrency model">;
208+
205209
def enable_resilience : Flag<["-"], "enable-resilience">,
206210
HelpText<"Deprecated, use -enable-library-evolution instead">;
207211

@@ -389,10 +393,6 @@ def enable_experimental_static_assert :
389393
Flag<["-"], "enable-experimental-static-assert">,
390394
HelpText<"Enable experimental #assert">;
391395

392-
def enable_experimental_concurrency :
393-
Flag<["-"], "enable-experimental-concurrency">,
394-
HelpText<"Enable experimental concurrency model">;
395-
396396
def enable_subst_sil_function_types_for_function_values :
397397
Flag<["-"], "enable-subst-sil-function-types-for-function-values">,
398398
HelpText<"Use substituted function types for SIL type lowering of function values">;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -typecheck -enable-library-evolution -enable-experimental-concurrency -emit-module-interface-path %t/Library.swiftinterface -DLIBRARY -module-name Library %s
3+
4+
#if LIBRARY
5+
public func fn() async {
6+
fatalError()
7+
}
8+
9+
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency -I %t
10+
11+
#else
12+
import Library
13+
14+
func callFn() async {
15+
await fn()
16+
}
17+
#endif
18+
19+
// RUN: %FileCheck %s <%t/Library.swiftinterface
20+
// CHECK: // swift-module-flags:{{.*}} -enable-experimental-concurrency
21+
// CHECK: public func fn() async

0 commit comments

Comments
 (0)