mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Instead of adding a "flag" (`m` in `...Tgm5`) make it more generic to allow to drop any unused argument. Add all dropped arguments with a `t<n-1>` (where `<n-1>` is empty for n === 0). For example `...Ttt2g5`.
21 lines
687 B
Swift
21 lines
687 B
Swift
// RUN: %target-swift-frontend -experimental-performance-annotations %s -sil-verify-all -module-name=test -emit-sil | %FileCheck %s
|
|
|
|
// REQUIRES: swift_in_compiler,swift_stdlib_no_asserts,optimized_stdlib
|
|
// UNSUPPORTED: swift_test_mode_optimize
|
|
|
|
public struct Stack<T> {
|
|
var size = 42
|
|
}
|
|
|
|
// CHECK-LABEL: sil [no_allocation] [perf_constraint] @$s4test11createStackyyF :
|
|
// CHECK: [[F:%[0-9]+]] = function_ref @$s4test5StackVACyxGycfCSi_Ttg5
|
|
// CHECK: [[S:%[0-9]+]] = apply [[F]]()
|
|
// CHECK: debug_value [[S]]
|
|
// CHECK: } // end sil function '$s4test11createStackyyF'
|
|
@_noAllocation
|
|
public func createStack() {
|
|
let s = Stack<Int>()
|
|
_ = s.size
|
|
}
|
|
|