@@ -151,7 +151,6 @@ pub trait LayoutGccExt<'tcx> {
151
151
fn immediate_gcc_type < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> Type < ' gcc > ;
152
152
fn scalar_gcc_type_at < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > , scalar : & abi:: Scalar , offset : Size ) -> Type < ' gcc > ;
153
153
fn scalar_pair_element_gcc_type < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > , index : usize ) -> Type < ' gcc > ;
154
- fn gcc_field_index ( & self , index : usize ) -> u64 ;
155
154
fn pointee_info_at < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > , offset : Size ) -> Option < PointeeInfo > ;
156
155
}
157
156
@@ -304,24 +303,6 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
304
303
self . scalar_gcc_type_at ( cx, scalar, offset)
305
304
}
306
305
307
- fn gcc_field_index ( & self , index : usize ) -> u64 {
308
- match self . abi {
309
- Abi :: Scalar ( _) | Abi :: ScalarPair ( ..) => {
310
- bug ! ( "TyAndLayout::gcc_field_index({:?}): not applicable" , self )
311
- }
312
- _ => { }
313
- }
314
- match self . fields {
315
- FieldsShape :: Primitive | FieldsShape :: Union ( _) => {
316
- bug ! ( "TyAndLayout::gcc_field_index({:?}): not applicable" , self )
317
- }
318
-
319
- FieldsShape :: Array { .. } => index as u64 ,
320
-
321
- FieldsShape :: Arbitrary { .. } => 1 + ( self . fields . memory_index ( index) as u64 ) * 2 ,
322
- }
323
- }
324
-
325
306
fn pointee_info_at < ' a > ( & self , cx : & CodegenCx < ' a , ' tcx > , offset : Size ) -> Option < PointeeInfo > {
326
307
if let Some ( & pointee) = cx. pointee_infos . borrow ( ) . get ( & ( self . ty , offset) ) {
327
308
return pointee;
@@ -351,10 +332,6 @@ impl<'gcc, 'tcx> LayoutTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
351
332
layout. is_gcc_scalar_pair ( )
352
333
}
353
334
354
- fn backend_field_index ( & self , layout : TyAndLayout < ' tcx > , index : usize ) -> u64 {
355
- layout. gcc_field_index ( index)
356
- }
357
-
358
335
fn scalar_pair_element_backend_type ( & self , layout : TyAndLayout < ' tcx > , index : usize , _immediate : bool ) -> Type < ' gcc > {
359
336
layout. scalar_pair_element_gcc_type ( self , index)
360
337
}
0 commit comments