Files
swift-mirror/test/SIL/Serialization/specializer_can_deserialize.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

20 lines
760 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module %S/Inputs/specializer_input.swift -O -parse-stdlib -parse-as-library -emit-module -o %t/Swift.swiftmodule -module-name=Swift -module-link-name swiftCore
// RUN: %target-swift-frontend %s -O -I %t -emit-sil -o - | %FileCheck %s
import Swift
// Make sure the specializer can deserialize code.
// CHECK-LABEL: sil {{.*}}@main
// CHECK: bb0({{.*}}):
// CHECK: function_ref @$ss9ContainerVAByxGycfCBi32__Ttg5{{.*}}
// CHECK: function_ref @$ss9ContainerV11doSomethingyyFBi32__Tg5{{.*}}
// CHECK-LABEL: sil shared [noinline] @$ss9ContainerVAByxGycfCBi32__Ttg5
// CHECK-LABEL: sil shared [noinline] @$ss9ContainerV11doSomethingyyFBi32__Tg5Tf4d_n
var c = Container<Int>()
c.doSomething()