Files
swift-mirror/test/SIL/Serialization/available.sil
Arnold Schwaighofer c2b2f1331f SIL representation
2021-10-06 04:54:49 -07:00

41 lines
1.6 KiB
Plaintext

// First parse this and then emit a *.sib. Then read in the *.sib, then recreate
// RUN: %empty-directory(%t)
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name available
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.2.sib -module-name available
// RUN: %target-sil-opt %t/tmp.2.sib -module-name available | %FileCheck %s
// UNSUPPORTED: OS=windows-msvc
import Builtin
public struct SomeData {}
// CHECK-LABEL: sil [serialized] [_specialize exported: true, kind: full, available: 10.50, where T == SomeData] @specialize_availability : $@convention(thin) <T> (@in_guaranteed T) -> ()
sil [serialized] [_specialize exported: true, kind: full, available: 10.50, where T == SomeData] @specialize_availability : $@convention(thin) <T> (@in_guaranteed T) -> () {
bb0(%0 : $*T):
return undef : $()
}
// CHECK-LABEL: sil [serialized] [weak_imported] @weak_func : $@convention(thin) () -> ()
sil [serialized] [weak_imported] @weak_func : $@convention(thin) () -> () {
bb0:
return undef : $()
}
// CHECK-LABEL: sil [serialized] [available 123.321.444] @version_subminor : $@convention(thin) () -> ()
sil [serialized] [available 123.321.444] @version_subminor : $@convention(thin) () -> () {
bb0:
return undef : $()
}
// CHECK-LABEL: sil [serialized] [available 123] @version_major : $@convention(thin) () -> ()
sil [serialized] [available 123] @version_major : $@convention(thin) () -> () {
bb0:
return undef : $()
}
// CHECK-LABEL: sil [serialized] [available 123.321] @version_minor : $@convention(thin) () -> ()
sil [serialized] [available 123.321] @version_minor : $@convention(thin) () -> () {
bb0:
return undef : $()
}