Files
swift-mirror/test/SIL/Serialization/Inputs/function_param_convention_input.sil
Michael Gottesman af565e7cc0 [sil-parser] Fix harmless bug when parsing ossa.
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.
2019-08-27 10:18:49 -07:00

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 : $()
}