@@ -5,9 +5,12 @@ use gccjit::{Struct, Type};
5
5
use rustc_middle:: bug;
6
6
use rustc_middle:: ty:: layout:: { LayoutOf , TyAndLayout } ;
7
7
use rustc_middle:: ty:: print:: with_no_trimmed_paths;
8
- use rustc_target:: abi:: { self , Abi , Align , F16 , F128 , F32 , F64 , FieldsShape , Int , Integer , Pointer , PointeeInfo , Size , TyAbiInterface , Variants } ;
9
8
use rustc_middle:: ty:: { self , Ty , TypeVisitableExt } ;
10
9
use rustc_target:: abi:: call:: { CastTarget , FnAbi , Reg } ;
10
+ use rustc_target:: abi:: {
11
+ self , Abi , Align , FieldsShape , Int , Integer , PointeeInfo , Pointer , Size , TyAbiInterface ,
12
+ Variants , F128 , F16 , F32 , F64 ,
13
+ } ;
11
14
12
15
use crate :: abi:: { FnAbiGcc , FnAbiGccExt , GccType } ;
13
16
use crate :: context:: CodegenCx ;
@@ -157,9 +160,22 @@ pub trait LayoutGccExt<'tcx> {
157
160
fn is_gcc_scalar_pair ( & self ) -> bool ;
158
161
fn gcc_type < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> Type < ' gcc > ;
159
162
fn immediate_gcc_type < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> Type < ' gcc > ;
160
- fn scalar_gcc_type_at < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > , scalar : & abi:: Scalar , offset : Size ) -> Type < ' gcc > ;
161
- fn scalar_pair_element_gcc_type < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > , index : usize ) -> Type < ' gcc > ;
162
- fn pointee_info_at < ' gcc > ( & self , cx : & CodegenCx < ' gcc , ' tcx > , offset : Size ) -> Option < PointeeInfo > ;
163
+ fn scalar_gcc_type_at < ' gcc > (
164
+ & self ,
165
+ cx : & CodegenCx < ' gcc , ' tcx > ,
166
+ scalar : & abi:: Scalar ,
167
+ offset : Size ,
168
+ ) -> Type < ' gcc > ;
169
+ fn scalar_pair_element_gcc_type < ' gcc > (
170
+ & self ,
171
+ cx : & CodegenCx < ' gcc , ' tcx > ,
172
+ index : usize ,
173
+ ) -> Type < ' gcc > ;
174
+ fn pointee_info_at < ' gcc > (
175
+ & self ,
176
+ cx : & CodegenCx < ' gcc , ' tcx > ,
177
+ offset : Size ,
178
+ ) -> Option < PointeeInfo > ;
163
179
}
164
180
165
181
impl < ' tcx > LayoutGccExt < ' tcx > for TyAndLayout < ' tcx > {
@@ -341,7 +357,12 @@ impl<'gcc, 'tcx> LayoutTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
341
357
layout. is_gcc_scalar_pair ( )
342
358
}
343
359
344
- fn scalar_pair_element_backend_type ( & self , layout : TyAndLayout < ' tcx > , index : usize , _immediate : bool ) -> Type < ' gcc > {
360
+ fn scalar_pair_element_backend_type (
361
+ & self ,
362
+ layout : TyAndLayout < ' tcx > ,
363
+ index : usize ,
364
+ _immediate : bool ,
365
+ ) -> Type < ' gcc > {
345
366
layout. scalar_pair_element_gcc_type ( self , index)
346
367
}
347
368
0 commit comments