mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
15 lines
646 B
Swift
15 lines
646 B
Swift
// RUN: %target-swift-frontend -emit-silgen -emit-verbose-sil -enable-sil-ownership %s | %FileCheck %s
|
|
|
|
// Test that the attribute gets set on default argument generators.
|
|
|
|
// CHECK-LABEL: sil hidden [transparent] @_T021transparent_attribute0A23FuncWithDefaultArgument1xS2i_tFfA_ : $@convention(thin) () -> Int {
|
|
|
|
// CHECK-LABEL: sil hidden [transparent] @_T021transparent_attribute0A23FuncWithDefaultArgument1xS2i_tF : $@convention(thin) (Int) -> Int {
|
|
|
|
@_transparent func transparentFuncWithDefaultArgument (x: Int = 1) -> Int {
|
|
return x
|
|
}
|
|
func useTransparentFuncWithDefaultArgument() -> Int {
|
|
return transparentFuncWithDefaultArgument()
|
|
}
|