Skip to content

Commit 136432a

Browse files
committed
Weaken test to pass on platforms without ObjC interop.
I don't know if there's a more direct way to conditionalize the FileCheck test here.
1 parent 1e90865 commit 136432a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/IRGen/type_layout_reference_storage.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ struct ReferenceStorageTypeLayout<T> {
2020
weak var cwi: C!
2121

2222
// -- Open-code layout for protocol types with witness tables.
23-
// CHECK-64: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_16_8_[[REF_XI:[0-9a-f]+]], i32 0, i32 0)
24-
// CHECK-32: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_8_4_[[REF_XI:[0-9a-f]+]], i32 0, i32 0)
23+
// Note that the layouts for unowned(safe) references are
24+
// only bitwise takable when ObjC interop is disabled.
25+
// CHECK-64: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_16_8_[[REF_XI:[0-9a-f]+]]{{(,|_bt,)}} i32 0, i32 0)
26+
// CHECK-32: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_8_4_[[REF_XI:[0-9a-f]+]]{{(,|_bt,)}} i32 0, i32 0)
2527
unowned(safe) var ps: P
2628
// CHECK-64: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_16_8_[[REF_XI]]_pod, i32 0, i32 0)
2729
// CHECK-32: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_8_4_[[REF_XI]]_pod, i32 0, i32 0)
@@ -33,8 +35,8 @@ struct ReferenceStorageTypeLayout<T> {
3335
// CHECK-32: store i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @type_layout_8_4_[[WEAK_XI]], i32 0, i32 0)
3436
weak var pwi: P!
3537

36-
// CHECK-64: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_24_8_[[REF_XI]], i32 0, i32 0)
37-
// CHECK-32: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_12_4_[[REF_XI]], i32 0, i32 0)
38+
// CHECK-64: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_24_8_[[REF_XI]]{{(,|_bt,)}} i32 0, i32 0)
39+
// CHECK-32: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_12_4_[[REF_XI]]{{(,|_bt,)}} i32 0, i32 0)
3840
unowned(safe) var pqs: protocol<P, Q>
3941
// CHECK-64: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_24_8_[[REF_XI]]_pod, i32 0, i32 0)
4042
// CHECK-32: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_12_4_[[REF_XI]]_pod, i32 0, i32 0)

0 commit comments

Comments
 (0)