@@ -654,12 +654,11 @@ pub fn type_metadata(
654654 // type is going to see *somthing* weird - the only
655655 // question is what exactly it will see
656656 let mem_pos = cx. mem_pos_of ( t) ;
657- let ( size, align) = ( mem_pos. size , mem_pos. align ) ;
658657 llvm:: LLVMRustDIBuilderCreateBasicType (
659658 DIB ( cx) ,
660659 SmallCStr :: new ( "<recur_type>" ) . as_ptr ( ) ,
661- size. bits ( ) ,
662- align. bits ( ) as u32 ,
660+ mem_pos . size . bits ( ) ,
661+ mem_pos . align . bits ( ) as u32 ,
663662 DW_ATE_unsigned )
664663 }
665664 } ;
@@ -853,14 +852,13 @@ fn basic_type_metadata(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll DIType {
853852 } ;
854853
855854 let mem_pos = cx. mem_pos_of ( t) ;
856- let ( size, align) = ( mem_pos. size , mem_pos. align ) ;
857855 let name = SmallCStr :: new ( name) ;
858856 let ty_metadata = unsafe {
859857 llvm:: LLVMRustDIBuilderCreateBasicType (
860858 DIB ( cx) ,
861859 name. as_ptr ( ) ,
862- size. bits ( ) ,
863- align. bits ( ) as u32 ,
860+ mem_pos . size . bits ( ) ,
861+ mem_pos . align . bits ( ) as u32 ,
864862 encoding)
865863 } ;
866864
@@ -1923,8 +1921,6 @@ fn prepare_enum_metadata(
19231921 } => {
19241922 let discr_type = discr. value . to_ty ( cx. tcx ) ;
19251923 let mem_pos = cx. mem_pos_of ( discr_type) ;
1926- let ( size, align) = ( mem_pos. size , mem_pos. align ) ;
1927-
19281924
19291925 let discr_metadata = basic_type_metadata ( cx, discr_type) ;
19301926 unsafe {
@@ -1934,8 +1930,8 @@ fn prepare_enum_metadata(
19341930 discriminator_name,
19351931 file_metadata,
19361932 UNKNOWN_LINE_NUMBER ,
1937- size. bits ( ) ,
1938- align. bits ( ) as u32 ,
1933+ mem_pos . size . bits ( ) ,
1934+ mem_pos . align . bits ( ) as u32 ,
19391935 layout. fields . offset ( discr_index) . bits ( ) ,
19401936 DIFlags :: FlagArtificial ,
19411937 discr_metadata) )
@@ -2137,7 +2133,6 @@ fn create_struct_stub(
21372133 containing_scope : Option < & ' ll DIScope > ,
21382134) -> & ' ll DICompositeType {
21392135 let struct_mem_pos = cx. mem_pos_of ( struct_type) ;
2140- let ( struct_size, struct_align) = ( struct_mem_pos. size , struct_mem_pos. align ) ;
21412136
21422137 let name = SmallCStr :: new ( struct_type_name) ;
21432138 let unique_type_id = SmallCStr :: new (
@@ -2155,8 +2150,8 @@ fn create_struct_stub(
21552150 name. as_ptr ( ) ,
21562151 unknown_file_metadata ( cx) ,
21572152 UNKNOWN_LINE_NUMBER ,
2158- struct_size . bits ( ) ,
2159- struct_align . bits ( ) as u32 ,
2153+ struct_mem_pos . size . bits ( ) ,
2154+ struct_mem_pos . align . bits ( ) as u32 ,
21602155 DIFlags :: FlagZero ,
21612156 None ,
21622157 empty_array,
0 commit comments