Skip to content

Commit a7c24c5

Browse files
authored
Merge pull request swiftlang#36990 from davezarzycki/pr36990
[Testing] Unbreak minimal Swift builds
2 parents 1504870 + 7508786 commit a7c24c5

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

test/SILOptimizer/closure_lifetime_fixup.swift

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend %S/../Inputs/resilient_struct.swift -enable-library-evolution -emit-module -emit-module-path %t/resilient_struct.swiftmodule
33
// RUN: %target-swift-frontend %S/../Inputs/resilient_enum.swift -I %t -enable-library-evolution -emit-module -emit-module-path %t/resilient_enum.swiftmodule
4-
// RUN: %target-swift-frontend %s -sil-verify-all -enable-experimental-concurrency -emit-sil -disable-copy-propagation -I %t -o - | %FileCheck %s
4+
// RUN: %target-swift-frontend %s -sil-verify-all -emit-sil -disable-copy-propagation -I %t -o - | %FileCheck %s
55

66
// Using -disable-copy-propagation to pattern match against older SIL
77
// output. At least until -enable-copy-propagation has been around
@@ -63,20 +63,6 @@ public func testGeneric(c: C) {
6363
use_closureGeneric { return c.returnInt() }
6464
}
6565

66-
// CHECK-LABEL: sil @$s22closure_lifetime_fixup12testAsyncLetyS2SYaF : $@convention(thin) @async (@guaranteed String) -> @owned String {
67-
// CHECK: [[PA:%.*]] = partial_apply [callee_guaranteed] [on_stack]
68-
// CHECK: [[MD:%.*]] = mark_dependence [[PA]]
69-
// CHECK: [[CONV:%.*]] = convert_function [[MD]]
70-
// CHECK: [[BAL:%.*]] = builtin "startAsyncLet"<String>([[CONV]]
71-
// CHECK: builtin "endAsyncLet"([[BAL]] : $Builtin.RawPointer, [[MD]]
72-
// CHECK: } // end sil function '$s22closure_lifetime_fixup12testAsyncLetyS2SYaF'
73-
74-
public func testAsyncLet(_ n: String) async -> String {
75-
async let first = n
76-
let result = await first
77-
return result
78-
}
79-
8066
public protocol P {
8167
associatedtype Element
8268
subscript<U>(a: (Element) -> U, b: (U) -> Element) -> U { get set }
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend %s -sil-verify-all -enable-experimental-concurrency -emit-sil -disable-copy-propagation -I %t -o - | %FileCheck %s
3+
// REQUIRES: concurrency
4+
5+
// CHECK-LABEL: sil @$s34closure_lifetime_fixup_concurrency12testAsyncLetyS2SYaF : $@convention(thin) @async (@guaranteed String) -> @owned String {
6+
// CHECK: [[PA:%.*]] = partial_apply [callee_guaranteed] [on_stack]
7+
// CHECK: [[MD:%.*]] = mark_dependence [[PA]]
8+
// CHECK: [[CONV:%.*]] = convert_function [[MD]]
9+
// CHECK: [[BAL:%.*]] = builtin "startAsyncLet"<String>([[CONV]]
10+
// CHECK: builtin "endAsyncLet"([[BAL]] : $Builtin.RawPointer, [[MD]]
11+
// CHECK: } // end sil function '$s34closure_lifetime_fixup_concurrency12testAsyncLetyS2SYaF'
12+
13+
public func testAsyncLet(_ n: String) async -> String {
14+
async let first = n
15+
let result = await first
16+
return result
17+
}

0 commit comments

Comments
 (0)