mirror of
https://github.com/apple/swift.git
synced 2026-10-20 19:13:47 +02:00
Instead of using an op_constu/consts in the DIExpr, the integer literal salvage now uses a debug basic block using a typed integer_literal. This also has the effect of supporting integer literals bigger than 64 bits (such as an Int128 being salvaged) correctly. Assisted-by: Claude
28 lines
502 B
Swift
28 lines
502 B
Swift
// RUN: %target-swift-frontend -O -emit-sil -Xllvm -sil-print-transform-blocks=false %s | %FileCheck %s
|
|
|
|
func bar(_ x : Int) { }
|
|
|
|
// CHECK-LABEL: $s6no_opt4foo1yyF
|
|
// CHECK-NOT: integer_literal
|
|
// CHECK: return
|
|
public func foo1() {
|
|
bar(1)
|
|
bar(2)
|
|
bar(3)
|
|
bar(4)
|
|
}
|
|
|
|
// CHECK-LABEL: $s6no_opt4foo2yyF
|
|
// CHECK: integer_literal
|
|
// CHECK: integer_literal
|
|
// CHECK: integer_literal
|
|
// CHECK: integer_literal
|
|
// CHECK: return
|
|
@_optimize(none)
|
|
public func foo2() {
|
|
bar(1)
|
|
bar(2)
|
|
bar(3)
|
|
bar(4)
|
|
}
|