@@ -20,8 +20,10 @@ struct ReferenceStorageTypeLayout<T> {
20
20
weak var cwi : C !
21
21
22
22
// -- 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)
25
27
unowned(safe) var ps : P
26
28
// CHECK-64: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_16_8_[[REF_XI]]_pod, i32 0, i32 0)
27
29
// 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> {
33
35
// CHECK-32: store i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @type_layout_8_4_[[WEAK_XI]], i32 0, i32 0)
34
36
weak var pwi : P !
35
37
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)
38
40
unowned(safe) var pqs : protocol < P , Q >
39
41
// CHECK-64: store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @type_layout_24_8_[[REF_XI]]_pod, i32 0, i32 0)
40
42
// 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