@@ -34,7 +34,7 @@ use super::utils::{
3434} ;
3535use crate :: common:: CodegenCx ;
3636use 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 } ;
3838use crate :: llvm:: debuginfo:: {
3939 DIDescriptor , DIFile , DIFlags , DILexicalBlock , DIScope , DIType , DebugEmissionKind ,
4040 DebugNameTableKind ,
@@ -161,7 +161,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
161161 unique_type_id : UniqueTypeId < ' tcx > ,
162162) -> DINodeCreationResult < ' ll > {
163163 // 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>`.
165165 assert_eq ! (
166166 cx. size_and_align_of( ptr_type) ,
167167 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>(
174174 let data_layout = & cx. tcx . data_layout ;
175175 let ptr_type_debuginfo_name = compute_debuginfo_type_name ( cx. tcx , ptr_type, true ) ;
176176
177- match fat_pointer_kind ( cx, pointee_type) {
177+ match wide_pointer_kind ( cx, pointee_type) {
178178 None => {
179179 // This is a thin pointer. Create a regular pointer type and give it the correct name.
180180 assert_eq ! (
@@ -197,7 +197,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
197197
198198 DINodeCreationResult { di_node, already_stored_in_typemap : false }
199199 }
200- Some ( fat_pointer_kind ) => {
200+ Some ( wide_pointer_kind ) => {
201201 type_map:: build_type_with_children (
202202 cx,
203203 type_map:: stub (
@@ -210,7 +210,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
210210 DIFlags :: FlagZero ,
211211 ) ,
212212 |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
214214 // type layout and instead use the layout of the raw pointer inside
215215 // of it.
216216 // 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>(
227227 } ;
228228
229229 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 ) ;
232232
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" ) ,
236236 } ;
237237
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 ) ;
240240
241241 // The data pointer type is a regular, thin pointer, regardless of whether this
242242 // is a slice or a trait object.
@@ -258,7 +258,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
258258 owner,
259259 addr_field_name,
260260 ( addr_field. size, addr_field. align. abi) ,
261- layout. fields. offset( abi:: FAT_PTR_ADDR ) ,
261+ layout. fields. offset( abi:: WIDE_PTR_ADDR ) ,
262262 DIFlags :: FlagZero ,
263263 data_ptr_type_di_node,
264264 ) ,
@@ -267,7 +267,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
267267 owner,
268268 extra_field_name,
269269 ( extra_field. size, extra_field. align. abi) ,
270- layout. fields. offset( abi:: FAT_PTR_EXTRA ) ,
270+ layout. fields. offset( abi:: WIDE_PTR_EXTRA ) ,
271271 DIFlags :: FlagZero ,
272272 type_di_node( cx, extra_field. ty) ,
273273 ) ,
@@ -391,7 +391,7 @@ fn build_dyn_type_di_node<'ll, 'tcx>(
391391///
392392/// NOTE: We currently emit just emit the debuginfo for the element type here
393393/// (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
395395/// debuginfo of `&[T]`.
396396///
397397/// It would be preferable and more accurate if we emitted a DIArray of T
0 commit comments