mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Find all the usages of `--enable-experimental-feature` or `--enable-upcoming-feature` in the tests and replace some of the `REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which should correctly apply to depending on the asserts/noasserts mode of the toolchain for each feature. Remove some comments that talked about enabling asserts since they don't apply anymore (but I might had miss some). All this was done with an automated script, so some formatting weirdness might happen, but I hope I fixed most of those. There might be some tests that were `REQUIRES: asserts` that might run in `noasserts` toolchains now. This will normally be because their feature went from experimental to upcoming/base and the tests were not updated.
59 lines
2.1 KiB
Swift
59 lines
2.1 KiB
Swift
// RUN: %target-swift-emit-irgen \
|
|
// RUN: %s \
|
|
// RUN: -enable-experimental-feature CoroutineAccessors \
|
|
// RUN: -enable-library-evolution \
|
|
// RUN: | %IRGenFileCheck %s --check-prefix=CHECK-OLD
|
|
|
|
// For now, a crash is expected when attempting to use the callee-allocated ABI:
|
|
// it's not implemented.
|
|
// RUN: not --crash \
|
|
// RUN: %target-swift-emit-irgen \
|
|
// RUN: %s \
|
|
// RUN: -enable-experimental-feature CoroutineAccessors \
|
|
// RUN: -enable-experimental-feature CoroutineAccessorsAllocateInCallee
|
|
|
|
// REQUIRES: swift_feature_CoroutineAccessors
|
|
// REQUIRES: swift_feature_CoroutineAccessorsAllocateInCallee
|
|
|
|
|
|
@frozen
|
|
public struct S {
|
|
public var o: any AnyObject
|
|
public var _i: Int = 0
|
|
|
|
public var irm: Int {
|
|
// CHECK-OLD-LABEL: define{{.*}} { ptr, {{i64|i32}} } @"$s19coroutine_accessors1SV3irmSivy"(
|
|
// CHECK-OLD-SAME: ptr noalias dereferenceable({{32|16}}) %0,
|
|
// CHECK-OLD-SAME: ptr %1,
|
|
// CHECK-OLD-SAME: [[INT]] %2
|
|
// CHECK-OLD-SAME: )
|
|
// CHECK-OLD-SAME: {
|
|
// CHECK-OLD: }
|
|
read {
|
|
yield _i
|
|
}
|
|
// CHECK-OLD-LABEL: define{{.*}} { ptr, ptr } @"$s19coroutine_accessors1SV3irmSivx"(
|
|
// CHECK-OLD-SAME: ptr noalias dereferenceable({{32|16}}) %0,
|
|
// CHECK-OLD-SAME: ptr nocapture swiftself dereferenceable({{16|8}}) %1
|
|
// CHECK-OLD-SAME: )
|
|
// CHECK-OLD-SAME: {
|
|
// CHECK-OLD: }
|
|
modify {
|
|
yield &_i
|
|
}
|
|
// CHECK-OLD-LABEL: define{{.*}} { ptr, {{i64|i32}} } @"$s19coroutine_accessors1SV3irmSivr"(
|
|
// CHECK-OLD-SAME: ptr noalias dereferenceable({{32|16}}) %0,
|
|
// CHECK-OLD-SAME: ptr %1,
|
|
// CHECK-OLD-SAME: [[INT]] %2
|
|
// CHECK-OLD-SAME: )
|
|
// CHECK-OLD-SAME: {
|
|
// CHECK-OLD: }
|
|
// CHECK-OLD-LABEL: define{{.*}} void @"$s19coroutine_accessors1SV3irmSivs"(
|
|
// CHECK-OLD-SAME: [[INT]] %0,
|
|
// CHECK-OLD-SAME: ptr nocapture swiftself dereferenceable({{16|8}}) %1
|
|
// CHECK-OLD-SAME: )
|
|
// CHECK-OLD-SAME: {
|
|
// CHECK-OLD: }
|
|
} // public var irm
|
|
}
|