@@ -654,12 +654,11 @@ pub fn type_metadata(
654
654
// type is going to see *somthing* weird - the only
655
655
// question is what exactly it will see
656
656
let mem_pos = cx. mem_pos_of ( t) ;
657
- let ( size, align) = ( mem_pos. size , mem_pos. align ) ;
658
657
llvm:: LLVMRustDIBuilderCreateBasicType (
659
658
DIB ( cx) ,
660
659
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 ,
663
662
DW_ATE_unsigned )
664
663
}
665
664
} ;
@@ -853,14 +852,13 @@ fn basic_type_metadata(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll DIType {
853
852
} ;
854
853
855
854
let mem_pos = cx. mem_pos_of ( t) ;
856
- let ( size, align) = ( mem_pos. size , mem_pos. align ) ;
857
855
let name = SmallCStr :: new ( name) ;
858
856
let ty_metadata = unsafe {
859
857
llvm:: LLVMRustDIBuilderCreateBasicType (
860
858
DIB ( cx) ,
861
859
name. as_ptr ( ) ,
862
- size. bits ( ) ,
863
- align. bits ( ) as u32 ,
860
+ mem_pos . size . bits ( ) ,
861
+ mem_pos . align . bits ( ) as u32 ,
864
862
encoding)
865
863
} ;
866
864
@@ -1923,8 +1921,6 @@ fn prepare_enum_metadata(
1923
1921
} => {
1924
1922
let discr_type = discr. value . to_ty ( cx. tcx ) ;
1925
1923
let mem_pos = cx. mem_pos_of ( discr_type) ;
1926
- let ( size, align) = ( mem_pos. size , mem_pos. align ) ;
1927
-
1928
1924
1929
1925
let discr_metadata = basic_type_metadata ( cx, discr_type) ;
1930
1926
unsafe {
@@ -1934,8 +1930,8 @@ fn prepare_enum_metadata(
1934
1930
discriminator_name,
1935
1931
file_metadata,
1936
1932
UNKNOWN_LINE_NUMBER ,
1937
- size. bits ( ) ,
1938
- align. bits ( ) as u32 ,
1933
+ mem_pos . size . bits ( ) ,
1934
+ mem_pos . align . bits ( ) as u32 ,
1939
1935
layout. fields . offset ( discr_index) . bits ( ) ,
1940
1936
DIFlags :: FlagArtificial ,
1941
1937
discr_metadata) )
@@ -2137,7 +2133,6 @@ fn create_struct_stub(
2137
2133
containing_scope : Option < & ' ll DIScope > ,
2138
2134
) -> & ' ll DICompositeType {
2139
2135
let struct_mem_pos = cx. mem_pos_of ( struct_type) ;
2140
- let ( struct_size, struct_align) = ( struct_mem_pos. size , struct_mem_pos. align ) ;
2141
2136
2142
2137
let name = SmallCStr :: new ( struct_type_name) ;
2143
2138
let unique_type_id = SmallCStr :: new (
@@ -2155,8 +2150,8 @@ fn create_struct_stub(
2155
2150
name. as_ptr ( ) ,
2156
2151
unknown_file_metadata ( cx) ,
2157
2152
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 ,
2160
2155
DIFlags :: FlagZero ,
2161
2156
None ,
2162
2157
empty_array,
0 commit comments