@@ -36,6 +36,10 @@ protocol FakeProtocol {
36
36
func requirement()
37
37
}
38
38
39
+ struct MyInt {
40
+ var value: Builtin.Int32
41
+ }
42
+
39
43
sil [global_init] @global_init_fun : $@convention(thin) () -> Builtin.RawPointer
40
44
41
45
sil @user : $@convention(thin) (@owned Builtin.NativeObject) -> ()
@@ -3723,3 +3727,26 @@ bb0(%2 : $TestObjCInit):
3723
3727
%19 = enum $Optional<TestObjCInit>, #Optional.some!enumelt.1, %14 : $TestObjCInit
3724
3728
return %19 : $Optional<TestObjCInit>
3725
3729
}
3730
+
3731
+ // CHECK-LABEL: sil @isConcrete_true : $@convention(thin) (@thin MyInt.Type) -> Builtin.Int1 {
3732
+ // CHECK: bb0(%0 : $@thin MyInt.Type):
3733
+ // CHECK: [[RESULT:%.*]] = integer_literal $Builtin.Int1, -1
3734
+ // CHECK: return [[RESULT]]
3735
+ // CHECK: } // end sil function 'isConcrete_true'
3736
+ sil @isConcrete_true : $@convention(thin) (@thin MyInt.Type) -> Builtin.Int1 {
3737
+ bb0(%0 : $@thin MyInt.Type):
3738
+ %1 = builtin "isConcrete"(%0 : $@thin MyInt.Type) : $Builtin.Int1
3739
+ return %1 : $Builtin.Int1
3740
+ }
3741
+
3742
+ // CHECK-LABEL: sil @isConcrete_false : $@convention(thin) <T> (@thin T.Type) -> Builtin.Int1 {
3743
+ // CHECK: bb0(%0 : $@thin T.Type):
3744
+ // CHECK: [[RESULT:%.*]] = builtin "isConcrete"<T>(%0 : $@thin T.Type) : $Builtin.Int1
3745
+ // CHECK: return [[RESULT]]
3746
+ // CHECK: } // end sil function 'isConcrete_false'
3747
+ sil @isConcrete_false : $@convention(thin) <T> (@thin T.Type) -> Builtin.Int1 {
3748
+ bb0(%0 : $@thin T.Type):
3749
+ // FIXME: Explicit specialization is required here when it shouldn't be
3750
+ %1 = builtin "isConcrete"<T>(%0 : $@thin T.Type) : $Builtin.Int1
3751
+ return %1 : $Builtin.Int1
3752
+ }
0 commit comments