mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
14 lines
495 B
Swift
14 lines
495 B
Swift
// RUN: %target-swift-frontend -O -g -emit-sil %s | %FileCheck %s
|
|
|
|
// In optimized code, a + b will be folded to 5, but we should still keep their
|
|
// debug values.
|
|
|
|
// CHECK-LABEL: sil
|
|
public func f() -> Int {
|
|
let a = 2
|
|
let b = 3
|
|
// CHECK: debug_value undef : $Builtin.Int{{32|64}}, let, name "a", type $Int, expr op_constu:2:op_fragment:#Int._value
|
|
// CHECK: debug_value undef : $Builtin.Int{{32|64}}, let, name "b", type $Int, expr op_constu:3:op_fragment:#Int._value
|
|
return a + b
|
|
}
|