@@ -245,7 +245,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
245
245
cx,
246
246
owner,
247
247
addr_field_name,
248
- ( addr_field. size , addr_field . align . abi ) ,
248
+ addr_field,
249
249
layout. fields. offset( WIDE_PTR_ADDR ) ,
250
250
DIFlags :: FlagZero ,
251
251
data_ptr_type_di_node,
@@ -255,7 +255,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
255
255
cx,
256
256
owner,
257
257
extra_field_name,
258
- ( extra_field. size , extra_field . align . abi ) ,
258
+ extra_field,
259
259
layout. fields. offset( WIDE_PTR_EXTRA ) ,
260
260
DIFlags :: FlagZero ,
261
261
type_di_node( cx, extra_field. ty) ,
@@ -738,7 +738,7 @@ fn build_cpp_f16_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) -> DINodeCreation
738
738
cx,
739
739
float_di_node,
740
740
"bits" ,
741
- cx. size_and_align_of ( bits_ty) ,
741
+ cx. layout_of ( bits_ty) ,
742
742
Size :: ZERO ,
743
743
DIFlags :: FlagZero ,
744
744
type_di_node( cx, bits_ty) ,
@@ -972,7 +972,7 @@ fn build_field_di_node<'ll, 'tcx>(
972
972
cx : & CodegenCx < ' ll , ' tcx > ,
973
973
owner : & ' ll DIScope ,
974
974
name : & str ,
975
- size_and_align : ( Size , Align ) ,
975
+ layout : TyAndLayout < ' tcx > ,
976
976
offset : Size ,
977
977
flags : DIFlags ,
978
978
type_di_node : & ' ll DIType ,
@@ -992,8 +992,8 @@ fn build_field_di_node<'ll, 'tcx>(
992
992
name. len ( ) ,
993
993
file_metadata,
994
994
line_number,
995
- size_and_align . 0 . bits ( ) ,
996
- size_and_align . 1 . bits ( ) as u32 ,
995
+ layout . size . bits ( ) ,
996
+ layout . align . abi . bits ( ) as u32 ,
997
997
offset. bits ( ) ,
998
998
flags,
999
999
type_di_node,
@@ -1077,7 +1077,7 @@ fn build_struct_type_di_node<'ll, 'tcx>(
1077
1077
cx,
1078
1078
owner,
1079
1079
& field_name[ ..] ,
1080
- ( field_layout. size , field_layout . align . abi ) ,
1080
+ field_layout,
1081
1081
struct_type_and_layout. fields . offset ( i) ,
1082
1082
visibility_di_flags ( cx, f. did , adt_def. did ( ) ) ,
1083
1083
type_di_node ( cx, field_layout. ty ) ,
@@ -1127,7 +1127,7 @@ fn build_upvar_field_di_nodes<'ll, 'tcx>(
1127
1127
cx,
1128
1128
closure_or_coroutine_di_node,
1129
1129
capture_name. as_str ( ) ,
1130
- cx. size_and_align_of ( up_var_ty) ,
1130
+ cx. layout_of ( up_var_ty) ,
1131
1131
layout. fields . offset ( index) ,
1132
1132
DIFlags :: FlagZero ,
1133
1133
type_di_node ( cx, up_var_ty) ,
@@ -1172,7 +1172,7 @@ fn build_tuple_type_di_node<'ll, 'tcx>(
1172
1172
cx,
1173
1173
tuple_di_node,
1174
1174
& tuple_field_name ( index) ,
1175
- cx. size_and_align_of ( component_type) ,
1175
+ cx. layout_of ( component_type) ,
1176
1176
tuple_type_and_layout. fields . offset ( index) ,
1177
1177
DIFlags :: FlagZero ,
1178
1178
type_di_node ( cx, component_type) ,
@@ -1270,7 +1270,7 @@ fn build_union_type_di_node<'ll, 'tcx>(
1270
1270
cx,
1271
1271
owner,
1272
1272
f. name . as_str ( ) ,
1273
- size_and_align_of ( field_layout) ,
1273
+ field_layout,
1274
1274
Size :: ZERO ,
1275
1275
DIFlags :: FlagZero ,
1276
1276
type_di_node ( cx, field_layout. ty ) ,
@@ -1418,7 +1418,9 @@ fn build_vtable_type_di_node<'ll, 'tcx>(
1418
1418
let void_pointer_ty = Ty :: new_imm_ptr ( tcx, tcx. types . unit ) ;
1419
1419
let void_pointer_type_di_node = type_di_node ( cx, void_pointer_ty) ;
1420
1420
let usize_di_node = type_di_node ( cx, tcx. types . usize ) ;
1421
- let ( pointer_size, pointer_align) = cx. size_and_align_of ( void_pointer_ty) ;
1421
+ let pointer_layout = cx. layout_of ( void_pointer_ty) ;
1422
+ let pointer_size = pointer_layout. size ;
1423
+ let pointer_align = pointer_layout. align . abi ;
1422
1424
// If `usize` is not pointer-sized and -aligned then the size and alignment computations
1423
1425
// for the vtable as a whole would be wrong. Let's make sure this holds even on weird
1424
1426
// platforms.
@@ -1474,7 +1476,7 @@ fn build_vtable_type_di_node<'ll, 'tcx>(
1474
1476
cx,
1475
1477
vtable_type_di_node,
1476
1478
& field_name,
1477
- ( pointer_size , pointer_align ) ,
1479
+ pointer_layout ,
1478
1480
field_offset,
1479
1481
DIFlags :: FlagZero ,
1480
1482
field_type_di_node,
0 commit comments