File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ // Mock SDK will contain an appropriate SDKSettings and a loadable stdlib
2+ // RUN: %empty-directory(%t/mock-sdk)
3+ // RUN: %empty-directory(%t/mock-sdk/usr/lib/swift)
4+ // RUN: cp -r %test-resource-dir/xros/Swift.swiftmodule %t/mock-sdk/usr/lib/swift/Swift.swiftmodule
5+ // RUN: cp %S/Inputs/mock-visionos-sdk/SDKSettings.json %t/mock-sdk/SDKSettings.json
6+ // RUN: %swift -emit-sil -parse-as-library %s -target arm64-apple-xros1.0 -sdk %t/mock-sdk -I %t/mock-sdk/usr/lib/swift/ -verify
7+ // RUN: %swift -emit-silgen -parse-as-library %s -target arm64-apple-xros1.0 -sdk %t/mock-sdk -I %t/mock-sdk/usr/lib/swift/ -o %t/ios_available_rawvalue_enum_on_visionos.sil
8+ // RUN: %FileCheck %s < %t/ios_available_rawvalue_enum_on_visionos.sil
9+
10+ // REQUIRES: OS=xros
11+
12+ // CHECK-LABEL: // Metasyntactics.init(rawValue:)
13+ // Ensure that no OS version check is generated because the current platform falls under the wildcard '*'
14+ // CHECK-NOT: function_ref @$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF
15+ public enum Metasyntactics : String , RawRepresentable {
16+ case foo
17+ @available ( iOS 17 . 0 , * )
18+ case bar
19+ @available ( iOS 99 . 0 , * )
20+ case baz
21+ @available ( iOS 1 . 0 , * )
22+ case qux
23+ @available ( iOS 16 . 0 , * )
24+ case quux
25+ @available ( iOS 999 . 9 . 9 , * )
26+ case corge
27+ @available ( iOS 18 . 0 , * )
28+ case grault
29+ case garply
30+ case waldo
31+ case fred
32+ case plugh
33+ case xyzzy
34+ case thud
35+ }
You can’t perform that action at this time.
0 commit comments