forked from swiftlang/swift
- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuiltins-misc.swift
35 lines (27 loc) · 827 Bytes
/
builtins-misc.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// RUN: %target-swift-emit-ir %s -parse-stdlib -module-name Swift -enable-experimental-feature Embedded -wmo -target arm64e-apple-none | %FileCheck %s
// REQUIRES: swift_in_compiler
// REQUIRES: swift_feature_Embedded
classMyClass{}
structMyStruct{
varc:MyClass
}
publicfunc foo()->Builtin.Int1{
returnBuiltin.ispod(MyStruct.self)
}
// CHECK: define {{.*}}i1 @"$es3fooBi1_yF"()
// CHECK-NEXT: entry:
// CHECK-NEXT: ret i1 false
// CHECK-NEXT: }
publicfunc bar()->Builtin.Int1{
vars=MyGenericStruct<MyStruct>()
return s.foo()
}
publicstructMyGenericStruct<T>{
publicfunc foo()->Builtin.Int1{
returnBuiltin.ispod(T.self)
}
}
// CHECK: define {{.*}}i1 @"$es15MyGenericStructV3fooBi1_yFs0aC0V_Tg5"()
// CHECK-NEXT: entry:
// CHECK-NEXT: ret i1 false
// CHECK-NEXT: }