File tree Expand file tree Collapse file tree 4 files changed +52
-11
lines changed Expand file tree Collapse file tree 4 files changed +52
-11
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
- // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_struct)) -enable-library-evolution %S/../Inputs/resilient_struct.swift -emit-module -emit-module-path %t/resilient_struct.swiftmodule -module-name resilient_struct
3
-
4
- // RUN: %target-swift-frontend -use-jit %s -emit-ir -lresilient_struct -L %t -I %t -enable-objc-interop -read-legacy-type-info-path=%S/Inputs/legacy_type_info/b.yaml | %FileCheck %s
5
- // RUN: %target-swift-frontend -interpret %s -lresilient_struct -L %t -I %t -enable-objc-interop -read-legacy-type-info-path=%S/Inputs/legacy_type_info/b.yaml
2
+ // RUN: %target-swift-frontend -emit-module -enable-library-evolution %S/../Inputs/resilient_struct.swift -emit-module-path %t/resilient_struct.swiftmodule
3
+ // RUN: %target-swift-frontend -use-jit %s -emit-ir -lresilient_struct -L %t -I %t -enable-objc-interop -read-legacy-type-info-path=%S/Inputs/legacy_type_info/jit_metadata_strategy.yaml | %FileCheck %s
6
4
7
5
// REQUIRES: objc_interop
8
- // UNSUPPORTED: OS=ios || OS=watchos || OS=tvos
9
6
10
7
import resilient_struct
11
8
12
- @_optimize ( none) func blackHole< T> ( _: T ) { }
13
-
14
9
// ClassMetadataStrategy::Fixed
15
10
class FixedSizeClass {
16
11
var v4 : String ?
@@ -40,10 +35,6 @@ class ClassNeedingUpdate {
40
35
var v6 : String ?
41
36
}
42
37
43
- blackHole ( FixedSizeClass ( ) )
44
- blackHole ( ClassWithGenericSuperclass ( ) )
45
- blackHole ( ClassNeedingUpdate ( ) )
46
-
47
38
// CHECK-LABEL: define{{( protected)?}} private void @runtime_registration
48
39
// CHECK: call void @swift_instantiateObjCClass({{.*}} @"$s21jit_metadata_strategy14FixedSizeClassCN")
49
40
// CHECK-NOT: call void @swift_instantiateObjCClass({{.*}} @"$s21jit_metadata_strategy18ClassNeedingUpdateCN")
Original file line number Diff line number Diff line change
1
+ Name : resilient_struct
2
+ Decls :
3
+ - Name : 16resilient_struct15ResilientDoubleV
4
+ Size : 8
5
+ Alignment : 8
6
+ ExtraInhabitants : 0
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_struct)) -enable-library-evolution %S/../Inputs/resilient_struct.swift -emit-module -emit-module-path %t/resilient_struct.swiftmodule -module-name resilient_struct
3
+
4
+ // RUN: %target-swift-frontend -interpret %s -lresilient_struct -L %t -I %t -enable-objc-interop -read-legacy-type-info-path=%S/Inputs/legacy_type_info/jit_metadata_strategy.yaml
5
+
6
+ // REQUIRES: objc_interop
7
+ // REQUIRES: swift_interpreter
8
+
9
+ import resilient_struct
10
+
11
+ @_optimize ( none) func blackHole< T> ( _: T ) { }
12
+
13
+ // ClassMetadataStrategy::Fixed
14
+ class FixedSizeClass {
15
+ var v4 : String ?
16
+ var v5 : Int ?
17
+ var v6 : String ?
18
+ }
19
+
20
+ // ClassMetadataStrategy::Singleton
21
+ class GenericSuperclass < T> { }
22
+ class ClassWithGenericSuperclass : GenericSuperclass < Int > {
23
+ var v1 : ResilientDouble ?
24
+ var v2 : ResilientDouble ?
25
+ var v3 : ResilientDouble ?
26
+ var v4 : String ?
27
+ var v5 : Int ?
28
+ var v6 : String ?
29
+ }
30
+
31
+ // ClassMetadataStrategy::FixedOrUpdate when compiling
32
+ // ClassMetadataStrategy::Singleton when interpreting
33
+ class ClassNeedingUpdate {
34
+ var v1 : ResilientDouble ?
35
+ var v2 : ResilientDouble ?
36
+ var v3 : ResilientDouble ?
37
+ var v4 : String ?
38
+ var v5 : Int ?
39
+ var v6 : String ?
40
+ }
41
+
42
+ blackHole ( FixedSizeClass ( ) )
43
+ blackHole ( ClassWithGenericSuperclass ( ) )
44
+ blackHole ( ClassNeedingUpdate ( ) )
You can’t perform that action at this time.
0 commit comments