Files
swift-mirror/test/SIL/Serialization/specializer_can_deserialize.swift
Joe Groff c0a2994564 AST: Start printing function types with @convention instead of old attributes.
And update tests to match.

Swift SVN r27262
2015-04-13 22:51:34 +00:00

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()