Files
swift-mirror/test/Concurrency/issue62394.swift
Erik Eckstein 7cceaff5f3 SIL: don't print operand types in textual SIL
Type annotations for instruction operands are omitted, e.g.

```
  %3 = struct $S(%1, %2)
```

Operand types are redundant anyway and were only used for sanity checking in the SIL parser.

But: operand types _are_ printed if the definition of the operand value was not printed yet.
This happens:

* if the block with the definition appears after the block where the operand's instruction is located

* if a block or instruction is printed in isolation, e.g. in a debugger

The old behavior can be restored with `-Xllvm -sil-print-types`.
This option is added to many existing test files which check for operand types in their check-lines.
2024-11-21 18:49:52 +01:00

22 lines
949 B
Swift

// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -Xllvm -sil-print-types -emit-silgen -verify %s | %FileCheck %s
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -Xllvm -sil-print-types -emit-silgen -verify -strict-concurrency=complete %s | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: concurrency
@MainActor
protocol P {
func test() async
}
struct S : P {
func test() {}
}
// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s10issue623941SVAA1PA2aDP4testyyYaFTW : $@convention(witness_method: P) @async (@in_guaranteed S) -> ()
// CHECK: [[MAIN_ACTOR:%.*]] = begin_borrow {{.*}} : $MainActor
// CHECK-NEXT: hop_to_executor [[MAIN_ACTOR]] : $MainActor
// CHECK: [[SELF:%.*]] = load [trivial] %0 : $*S
// CHECK: [[TEST_FN:%.*]] = function_ref @$s10issue623941SV4testyyF : $@convention(method) (S) -> ()
// CHECK-NEXT: {{.*}} = apply [[TEST_FN]]([[SELF]]) : $@convention(method) (S) -> ()