Skip to content

Commit a80267a

Browse files
authored
Merge pull request #2758 from etcwilde/ewilde/remove-runAsyncAndBlock
Remove runAsyncAndBlock
2 parents 8907537 + 09e2486 commit a80267a

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
SWIFT_SOURCES := main.swift
2-
SWIFTFLAGS_EXTRAS := -Xfrontend -enable-experimental-concurrency
2+
SWIFTFLAGS_EXTRAS := -Xfrontend -enable-experimental-concurrency -parse-as-library
33
include Makefile.rules

lldb/test/API/lang/swift/async/async_fnargs/main.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ func sayGeneric<T>(_ msg: T) async {
1111
print(msg) // And also here.
1212
}
1313

14-
runAsyncAndBlock {
15-
await sayHello()
16-
await sayGeneric("world")
14+
@main struct Main {
15+
static func main() async {
16+
await sayHello()
17+
await sayGeneric("world")
18+
}
1719
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
SWIFT_SOURCES := main.swift
2-
SWIFTFLAGS_EXTRAS := -Xfrontend -enable-experimental-concurrency
2+
SWIFTFLAGS_EXTRAS := -Xfrontend -enable-experimental-concurrency -parse-as-library
33
include Makefile.rules

lldb/test/API/lang/swift/async/unwind/sayhello/main.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ func sayGeneric<T>(_ msg: T) async {
2020
print("\(str) after calls - arg \(msg)")
2121
}
2222

23-
runAsyncAndBlock {
24-
await sayGeneric("world")
25-
await sayHello()
23+
@main struct Main {
24+
static func main() async {
25+
await sayGeneric("world")
26+
await sayHello()
27+
}
2628
}

0 commit comments

Comments
 (0)