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

36 lines
1.6 KiB
Plaintext

// RUN: %target-sil-opt %s | %FileCheck %s
// RUN: %target-sil-opt %s | %target-sil-opt | %FileCheck %s
// UNSUPPORTED: OS=windows-msvc
@available(*,unavailable,message: "it has been renamed")
public struct mmConstUnsafePointer<T> {
}
// CHECK-LABEL: sil hidden @test : $@convention(thin) <T> (@thin mmConstUnsafePointer<T>.Type) -> mmConstUnsafePointer<T> {
// CHECK: struct $mmConstUnsafePointer<T> ()
sil hidden @test : $@convention(thin) <T> (@thin mmConstUnsafePointer<T>.Type) -> mmConstUnsafePointer<T> {
bb0(%0 : $@thin mmConstUnsafePointer<T>.Type):
%1 = struct $mmConstUnsafePointer<T> ()
return %1 : $mmConstUnsafePointer<T>
}
// CHECK-LABEL: sil [available 123] @version_major : $@convention(thin) () -> ()
sil [available 123] @version_major : $@convention(thin) () -> ()
// CHECK-LABEL: sil [available 123.321] @version_minor : $@convention(thin) () -> ()
sil [available 123.321] @version_minor : $@convention(thin) () -> ()
// CHECK-LABEL: sil [available 123.321.444] @version_subminor : $@convention(thin) () -> ()
sil [available 123.321.444] @version_subminor : $@convention(thin) () -> ()
// CHECK-LABEL: sil [weak_imported] @weak_func : $@convention(thin) () -> ()
sil [weak_imported] @weak_func : $@convention(thin) () -> ()
public struct SomeData {}
// CHECK-LABEL: sil [_specialize exported: true, kind: full, available: 10.50, where T == SomeData] @specialize_availability : $@convention(thin) <T> (@in_guaranteed T) -> ()
sil [_specialize exported: true, kind: full, available: 10.50, where T == SomeData] @specialize_availability : $@convention(thin) <T> (@in_guaranteed T) -> () {
entry(%0 : $*T):
return undef: $()
}