Files
swift-mirror/test/SIL/Serialization/Inputs/generic_shared_function_helper.sil
Joe Groff c0a2994564 AST: Start printing function types with @convention instead of old attributes.
And update tests to match.

Swift SVN r27262
2015-04-13 22:51:34 +00:00

23 lines
1002 B
Plaintext

import Swift
@asmname("public_func") public func public_func<T>() -> T?
sil public_external @impl_func : $@convention(thin) <T> (@out Optional<T>) -> ()
sil shared [fragile] @shared_func : $@convention(thin) <T> (@out Optional<T>) -> () {
bb0(%0 : $*Optional<T>):
%1 = function_ref @impl_func : $@convention(thin) <τ_0_0> (@out Optional<τ_0_0>) -> () // user: %2
%2 = apply %1<T>(%0) : $@convention(thin) <τ_0_0> (@out Optional<τ_0_0>) -> ()
%3 = tuple () // user: %4
return %3 : $() // id: %4
}
sil public [fragile] @public_func : $@convention(thin) <T> (@out Optional<T>) -> () {
bb0(%0 : $*Optional<T>):
%1 = function_ref @shared_func : $@convention(thin) <τ_0_0> (@out Optional<τ_0_0>) -> () // user: %2
%2 = apply %1<T>(%0) : $@convention(thin) <τ_0_0> (@out Optional<τ_0_0>) -> ()
%3 = tuple () // user: %4
return %3 : $() // id: %4
}