@@ -34,7 +34,7 @@ use super::utils::{
34
34
} ;
35
35
use crate :: common:: CodegenCx ;
36
36
use crate :: debuginfo:: metadata:: type_map:: build_type_with_children;
37
- use crate :: debuginfo:: utils:: { FatPtrKind , fat_pointer_kind } ;
37
+ use crate :: debuginfo:: utils:: { WidePtrKind , wide_pointer_kind } ;
38
38
use crate :: llvm:: debuginfo:: {
39
39
DIDescriptor , DIFile , DIFlags , DILexicalBlock , DIScope , DIType , DebugEmissionKind ,
40
40
DebugNameTableKind ,
@@ -161,7 +161,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
161
161
unique_type_id : UniqueTypeId < ' tcx > ,
162
162
) -> DINodeCreationResult < ' ll > {
163
163
// The debuginfo generated by this function is only valid if `ptr_type` is really just
164
- // a (fat ) pointer. Make sure it is not called for e.g. `Box<T, NonZSTAllocator>`.
164
+ // a (wide ) pointer. Make sure it is not called for e.g. `Box<T, NonZSTAllocator>`.
165
165
assert_eq ! (
166
166
cx. size_and_align_of( ptr_type) ,
167
167
cx. size_and_align_of( Ty :: new_mut_ptr( cx. tcx, pointee_type) )
@@ -174,7 +174,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
174
174
let data_layout = & cx. tcx . data_layout ;
175
175
let ptr_type_debuginfo_name = compute_debuginfo_type_name ( cx. tcx , ptr_type, true ) ;
176
176
177
- match fat_pointer_kind ( cx, pointee_type) {
177
+ match wide_pointer_kind ( cx, pointee_type) {
178
178
None => {
179
179
// This is a thin pointer. Create a regular pointer type and give it the correct name.
180
180
assert_eq ! (
@@ -197,7 +197,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
197
197
198
198
DINodeCreationResult { di_node, already_stored_in_typemap : false }
199
199
}
200
- Some ( fat_pointer_kind ) => {
200
+ Some ( wide_pointer_kind ) => {
201
201
type_map:: build_type_with_children (
202
202
cx,
203
203
type_map:: stub (
@@ -210,7 +210,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
210
210
DIFlags :: FlagZero ,
211
211
) ,
212
212
|cx, owner| {
213
- // FIXME: If this fat pointer is a `Box` then we don't want to use its
213
+ // FIXME: If this wide pointer is a `Box` then we don't want to use its
214
214
// type layout and instead use the layout of the raw pointer inside
215
215
// of it.
216
216
// The proper way to handle this is to not treat Box as a pointer
@@ -227,16 +227,16 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
227
227
} ;
228
228
229
229
let layout = cx. layout_of ( layout_type) ;
230
- let addr_field = layout. field ( cx, abi:: FAT_PTR_ADDR ) ;
231
- let extra_field = layout. field ( cx, abi:: FAT_PTR_EXTRA ) ;
230
+ let addr_field = layout. field ( cx, abi:: WIDE_PTR_ADDR ) ;
231
+ let extra_field = layout. field ( cx, abi:: WIDE_PTR_EXTRA ) ;
232
232
233
- let ( addr_field_name, extra_field_name) = match fat_pointer_kind {
234
- FatPtrKind :: Dyn => ( "pointer" , "vtable" ) ,
235
- FatPtrKind :: Slice => ( "data_ptr" , "length" ) ,
233
+ let ( addr_field_name, extra_field_name) = match wide_pointer_kind {
234
+ WidePtrKind :: Dyn => ( "pointer" , "vtable" ) ,
235
+ WidePtrKind :: Slice => ( "data_ptr" , "length" ) ,
236
236
} ;
237
237
238
- assert_eq ! ( abi:: FAT_PTR_ADDR , 0 ) ;
239
- assert_eq ! ( abi:: FAT_PTR_EXTRA , 1 ) ;
238
+ assert_eq ! ( abi:: WIDE_PTR_ADDR , 0 ) ;
239
+ assert_eq ! ( abi:: WIDE_PTR_EXTRA , 1 ) ;
240
240
241
241
// The data pointer type is a regular, thin pointer, regardless of whether this
242
242
// is a slice or a trait object.
@@ -258,7 +258,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
258
258
owner,
259
259
addr_field_name,
260
260
( addr_field. size, addr_field. align. abi) ,
261
- layout. fields. offset( abi:: FAT_PTR_ADDR ) ,
261
+ layout. fields. offset( abi:: WIDE_PTR_ADDR ) ,
262
262
DIFlags :: FlagZero ,
263
263
data_ptr_type_di_node,
264
264
) ,
@@ -267,7 +267,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
267
267
owner,
268
268
extra_field_name,
269
269
( extra_field. size, extra_field. align. abi) ,
270
- layout. fields. offset( abi:: FAT_PTR_EXTRA ) ,
270
+ layout. fields. offset( abi:: WIDE_PTR_EXTRA ) ,
271
271
DIFlags :: FlagZero ,
272
272
type_di_node( cx, extra_field. ty) ,
273
273
) ,
@@ -391,7 +391,7 @@ fn build_dyn_type_di_node<'ll, 'tcx>(
391
391
///
392
392
/// NOTE: We currently emit just emit the debuginfo for the element type here
393
393
/// (i.e. `T` for slices and `u8` for `str`), so that we end up with
394
- /// `*const T` for the `data_ptr` field of the corresponding fat -pointer
394
+ /// `*const T` for the `data_ptr` field of the corresponding wide -pointer
395
395
/// debuginfo of `&[T]`.
396
396
///
397
397
/// It would be preferable and more accurate if we emitted a DIArray of T
0 commit comments