Files
swift-mirror/test/SILGen/execution_attr.swift
Anthony Latsis ba31190f8b [NFC] Remove unnecessary asserts requirement in @execution tests
These files already have the appropriate Lit feature markers to prevent
them from running with asserts if necessary.
2025-03-17 19:46:25 +00:00

22 lines
1.0 KiB
Swift

// RUN: %target-swift-emit-silgen %s -enable-experimental-feature ExecutionAttribute | %FileCheck %s
// RUN: %target-swift-emit-silgen %s -enable-experimental-feature ExecutionAttribute -enable-experimental-feature AsyncCallerExecution | %FileCheck %s
// REQUIRES: concurrency
// REQUIRES: swift_feature_ExecutionAttribute
// REQUIRES: swift_feature_AsyncCallerExecution
// Validate that both with and without the experimental flag we properly codegen
// execution(caller) and execution(concurrent).
// CHECK-LABEL: // executionCaller()
// CHECK-NEXT: // Isolation: caller_isolation_inheriting
// CHECK-NEXT: sil hidden [ossa] @$s14execution_attr0A6CalleryyYaF : $@convention(thin) @async (@sil_isolated @sil_implicit_leading_param @guaranteed Optional<any Actor>) -> () {
@execution(caller)
func executionCaller() async {}
// CHECK-LABEL: // executionConcurrent()
// CHECK: // Isolation: nonisolated
// CHECK: sil hidden [ossa] @$s14execution_attr0A10ConcurrentyyYaF : $@convention(thin) @async () -> () {
@execution(concurrent)
func executionConcurrent() async {}