mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
21 lines
1.1 KiB
Swift
21 lines
1.1 KiB
Swift
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: %target-swift-frontend -emit-module %S/Inputs/specializer_input.swift -O -sil-serialize-all -parse-stdlib -parse-as-library -emit-module -o %t/Swift.swiftmodule -module-name=Swift -module-link-name swiftCore -sil-inline-threshold 0 -disable-func-sig-opts
|
|
// RUN: %target-swift-frontend %s -O -I %t -emit-sil -o - -sil-inline-threshold 0 -disable-func-sig-opts | FileCheck %s
|
|
|
|
import Swift
|
|
|
|
// Make sure the specializer can deserialize code.
|
|
|
|
// CHECK-LABEL: sil @main
|
|
// CHECK: bb0({{.*}}):
|
|
// CHECK: function_ref @_TTSg5Bi32____TFVSs9ContainerCU__fMGS_Q__FT_GS_Q__
|
|
// CHECK: function_ref @_TTSg5Bi32____TFVSs9Container11doSomethingU__fGS_Q__FT_T_ : $@convention(method) (Container<Builtin.Int32>) -> ()
|
|
|
|
// CHECK-LABEL: sil shared [fragile] @_TTSg5Bi32____TFVSs9ContainerCU__fMGS_Q__FT_GS_Q__ : $@convention(thin) (@thin Container<Builtin.Int32>.Type) -> Container<Builtin.Int32> {
|
|
|
|
// CHECK-LABEL: sil shared [fragile] @_TTSg5Bi32____TFVSs9Container11doSomethingU__fGS_Q__FT_T_ : $@convention(method) (Container<Builtin.Int32>) -> () {
|
|
|
|
var c = Container<Int>()
|
|
c.doSomething()
|