mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
19 lines
505 B
Swift
19 lines
505 B
Swift
// RUN: %target-swift-frontend -emit-sil %s | %FileCheck %s
|
|
|
|
// Make sure that we are able to inline try-apply instructions.
|
|
|
|
@_transparent
|
|
public func foo() throws -> Int32 {
|
|
return 999
|
|
}
|
|
|
|
// CHECK-LABEL: _T012throw_inline3foos5Int32VyKF
|
|
// CHECK: debug_value undef : $Error, var, name "$error", argno 1
|
|
// CHECK: %1 = integer_literal $Builtin.Int32, 999
|
|
// CHECK: %[[POS:.*]] = struct $Int32 (%1 : $Builtin.Int32)
|
|
// CHECK: return %[[POS]] : $Int32
|
|
func bar() throws -> Int32 {
|
|
return try foo()
|
|
}
|
|
|