File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-ir -parse-sil %s -module-name Swift -parse-stdlib | %FileCheck %s
2
+
3
+ import Builtin
4
+
5
+ struct MyInt {
6
+ var value: Builtin.Int32
7
+ }
8
+
9
+ // CHECK-LABEL: define swiftcc i1 @isConcrete_true() {{.*}} {
10
+ // CHECK-NEXT: entry:
11
+ // CHECK-NEXT: ret i1 true
12
+ // CHECK-NEXT: }
13
+ sil @isConcrete_true : $@convention(thin) (@thin MyInt.Type) -> Builtin.Int1 {
14
+ bb0(%0 : $@thin MyInt.Type):
15
+ %1 = builtin "isConcrete"(%0 : $@thin MyInt.Type) : $Builtin.Int1
16
+ return %1 : $Builtin.Int1
17
+ }
18
+
19
+ // CHECK-LABEL: define swiftcc i1 @isConcrete_false(%swift.type* %T) {{.*}} {
20
+ // CHECK-NEXT: entry:
21
+ // CHECK: ret i1 false
22
+ // CHECK-NEXT: }
23
+ sil @isConcrete_false : $@convention(thin) <T> (@thin T.Type) -> Builtin.Int1 {
24
+ bb0(%0 : $@thin T.Type):
25
+ %1 = builtin "isConcrete"<T>(%0 : $@thin T.Type) : $Builtin.Int1
26
+ return %1 : $Builtin.Int1
27
+ }
You can’t perform that action at this time.
0 commit comments