mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Specifically, we were preferring the always correct ownership kind specified by the FunctionType and ignoring what we parsed from the argument. This PR changes ossa to give a nice error when this is detected and fixes the places where this tests were written incorrectly.
19 lines
511 B
Plaintext
19 lines
511 B
Plaintext
|
|
sil_stage raw
|
|
|
|
import Builtin
|
|
|
|
struct X {
|
|
let x: Builtin.NativeObject
|
|
}
|
|
|
|
// Make sure that we can deserialize an apply with various parameter calling
|
|
// conventions.
|
|
sil [serialized] [ossa] @foo : $@convention(thin) (@in X, @inout X, @in_guaranteed X, @owned X, X, @guaranteed X) -> @out X {
|
|
bb0(%0 : $*X, %1 : $*X, %2 : $*X, %3 : $*X, %4 : @owned $X, %5 : @unowned $X, %6 : @guaranteed $X):
|
|
copy_addr [take] %1 to [initialization] %0 : $*X
|
|
destroy_value %4 : $X
|
|
%9999 = tuple()
|
|
return %9999 : $()
|
|
}
|