Files
swift-mirror/test/SILOptimizer/performance-annotations2.swift
Erik Eckstein c8e74b8393 Generic specialization: change the mangling for dropped metatype arguments
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`.
2024-08-26 10:43:15 +02:00

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
}