@@ -176,15 +176,14 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
176
176
177
177
return_if_di_node_created_in_meantime ! ( cx, unique_type_id) ;
178
178
179
- let ( thin_pointer_size, thin_pointer_align) =
180
- cx. size_and_align_of ( cx. tcx . mk_imm_ptr ( cx. tcx . types . unit ) ) ;
179
+ let data_layout = & cx. tcx . data_layout ;
181
180
let ptr_type_debuginfo_name = compute_debuginfo_type_name ( cx. tcx , ptr_type, true ) ;
182
181
183
182
match fat_pointer_kind ( cx, pointee_type) {
184
183
None => {
185
184
// This is a thin pointer. Create a regular pointer type and give it the correct name.
186
185
debug_assert_eq ! (
187
- ( thin_pointer_size , thin_pointer_align ) ,
186
+ ( data_layout . pointer_size , data_layout . pointer_align . abi ) ,
188
187
cx. size_and_align_of( ptr_type) ,
189
188
"ptr_type={}, pointee_type={}" ,
190
189
ptr_type,
@@ -195,8 +194,8 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
195
194
llvm:: LLVMRustDIBuilderCreatePointerType (
196
195
DIB ( cx) ,
197
196
pointee_type_di_node,
198
- thin_pointer_size . bits ( ) ,
199
- thin_pointer_align . bits ( ) as u32 ,
197
+ data_layout . pointer_size . bits ( ) ,
198
+ data_layout . pointer_align . abi . bits ( ) as u32 ,
200
199
0 , // Ignore DWARF address space.
201
200
ptr_type_debuginfo_name. as_ptr ( ) . cast ( ) ,
202
201
ptr_type_debuginfo_name. len ( ) ,
0 commit comments