blob: fae6935e7074b89d0dd51f1027dc6a6e97ae77b2 [file] [log] [blame]
// RUN: %target-swift-frontend -primary-file %s -emit-sil -emit-verbose-sil | %FileCheck %s
func searchForMe(_ x: Float) -> Float {
return x
}
@_transparent func baz(_ x: Float) -> Float {
return searchForMe(x);
}
@_transparent func bar(_ x: Float, _ b: Bool) -> Float {
if b {
return baz(x)
}
return x
// CHECK-LABEL: $S13sil_locations3bar{{[_0-9a-zA-Z]*}}F
// CHECK: function_ref @$S13sil_locations11searchForMe{{[_0-9a-zA-Z]*}}F : {{.*}} line:13:12:minlined
// CHECK: apply {{.*}} line:13:12:minlined
}
func testMandatoryInlining(_ x: Float, b: Bool) -> Float {
return bar(x, b)
// CHECK-LABEL: $S13sil_locations21testMandatoryInlining{{[_0-9a-zA-Z]*}}F
// CHECK: function_ref @$S13sil_locations11searchForMeyS2fF : {{.*}} line:22:10:minlined
// CHECK: apply {{.*}} line:22:10:minlined
// CHECK: br {{.*}} line:22:10:minlined
// CHECK: br {{.*}} line:22:10:minlined
}