@@ -245,7 +245,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
245245 cx,
246246 owner,
247247 addr_field_name,
248- ( addr_field. size , addr_field . align . abi ) ,
248+ addr_field,
249249 layout. fields. offset( WIDE_PTR_ADDR ) ,
250250 DIFlags :: FlagZero ,
251251 data_ptr_type_di_node,
@@ -255,7 +255,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
255255 cx,
256256 owner,
257257 extra_field_name,
258- ( extra_field. size , extra_field . align . abi ) ,
258+ extra_field,
259259 layout. fields. offset( WIDE_PTR_EXTRA ) ,
260260 DIFlags :: FlagZero ,
261261 type_di_node( cx, extra_field. ty) ,
@@ -738,7 +738,7 @@ fn build_cpp_f16_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) -> DINodeCreation
738738 cx,
739739 float_di_node,
740740 "bits" ,
741- cx. size_and_align_of ( bits_ty) ,
741+ cx. layout_of ( bits_ty) ,
742742 Size :: ZERO ,
743743 DIFlags :: FlagZero ,
744744 type_di_node( cx, bits_ty) ,
@@ -972,7 +972,7 @@ fn build_field_di_node<'ll, 'tcx>(
972972 cx : & CodegenCx < ' ll , ' tcx > ,
973973 owner : & ' ll DIScope ,
974974 name : & str ,
975- size_and_align : ( Size , Align ) ,
975+ layout : TyAndLayout < ' tcx > ,
976976 offset : Size ,
977977 flags : DIFlags ,
978978 type_di_node : & ' ll DIType ,
@@ -992,8 +992,8 @@ fn build_field_di_node<'ll, 'tcx>(
992992 name. len ( ) ,
993993 file_metadata,
994994 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 ,
997997 offset. bits ( ) ,
998998 flags,
999999 type_di_node,
@@ -1077,7 +1077,7 @@ fn build_struct_type_di_node<'ll, 'tcx>(
10771077 cx,
10781078 owner,
10791079 & field_name[ ..] ,
1080- ( field_layout. size , field_layout . align . abi ) ,
1080+ field_layout,
10811081 struct_type_and_layout. fields . offset ( i) ,
10821082 visibility_di_flags ( cx, f. did , adt_def. did ( ) ) ,
10831083 type_di_node ( cx, field_layout. ty ) ,
@@ -1127,7 +1127,7 @@ fn build_upvar_field_di_nodes<'ll, 'tcx>(
11271127 cx,
11281128 closure_or_coroutine_di_node,
11291129 capture_name. as_str ( ) ,
1130- cx. size_and_align_of ( up_var_ty) ,
1130+ cx. layout_of ( up_var_ty) ,
11311131 layout. fields . offset ( index) ,
11321132 DIFlags :: FlagZero ,
11331133 type_di_node ( cx, up_var_ty) ,
@@ -1172,7 +1172,7 @@ fn build_tuple_type_di_node<'ll, 'tcx>(
11721172 cx,
11731173 tuple_di_node,
11741174 & tuple_field_name ( index) ,
1175- cx. size_and_align_of ( component_type) ,
1175+ cx. layout_of ( component_type) ,
11761176 tuple_type_and_layout. fields . offset ( index) ,
11771177 DIFlags :: FlagZero ,
11781178 type_di_node ( cx, component_type) ,
@@ -1270,7 +1270,7 @@ fn build_union_type_di_node<'ll, 'tcx>(
12701270 cx,
12711271 owner,
12721272 f. name . as_str ( ) ,
1273- size_and_align_of ( field_layout) ,
1273+ field_layout,
12741274 Size :: ZERO ,
12751275 DIFlags :: FlagZero ,
12761276 type_di_node ( cx, field_layout. ty ) ,
@@ -1418,7 +1418,9 @@ fn build_vtable_type_di_node<'ll, 'tcx>(
14181418 let void_pointer_ty = Ty :: new_imm_ptr ( tcx, tcx. types . unit ) ;
14191419 let void_pointer_type_di_node = type_di_node ( cx, void_pointer_ty) ;
14201420 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 ;
14221424 // If `usize` is not pointer-sized and -aligned then the size and alignment computations
14231425 // for the vtable as a whole would be wrong. Let's make sure this holds even on weird
14241426 // platforms.
@@ -1474,7 +1476,7 @@ fn build_vtable_type_di_node<'ll, 'tcx>(
14741476 cx,
14751477 vtable_type_di_node,
14761478 & field_name,
1477- ( pointer_size , pointer_align ) ,
1479+ pointer_layout ,
14781480 field_offset,
14791481 DIFlags :: FlagZero ,
14801482 field_type_di_node,
0 commit comments