@@ -15,7 +15,6 @@ use rustc_target::callconv::{Conv, RiscvInterruptKind};
15
15
16
16
use crate :: builder:: Builder ;
17
17
use crate :: context:: CodegenCx ;
18
- use crate :: intrinsic:: ArgAbiExt ;
19
18
use crate :: type_of:: LayoutGccExt ;
20
19
21
20
impl AbiBuilderMethods for Builder < ' _ , ' _ , ' _ > {
@@ -125,7 +124,7 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
125
124
PassMode :: Direct ( _) | PassMode :: Pair ( ..) => self . ret . layout . immediate_gcc_type ( cx) ,
126
125
PassMode :: Cast { ref cast, .. } => cast. gcc_type ( cx) ,
127
126
PassMode :: Indirect { .. } => {
128
- argument_tys. push ( cx. type_ptr_to ( self . ret . memory_ty ( cx) ) ) ;
127
+ argument_tys. push ( cx. type_ptr_to ( self . ret . layout . gcc_type ( cx) ) ) ;
129
128
cx. type_void ( )
130
129
}
131
130
} ;
@@ -176,13 +175,13 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
176
175
PassMode :: Indirect { attrs : _, meta_attrs : None , on_stack : true } => {
177
176
// This is a "byval" argument, so we don't apply the `restrict` attribute on it.
178
177
on_stack_param_indices. insert ( argument_tys. len ( ) ) ;
179
- arg. memory_ty ( cx)
178
+ arg. layout . gcc_type ( cx)
180
179
}
181
180
PassMode :: Direct ( attrs) => {
182
181
apply_attrs ( arg. layout . immediate_gcc_type ( cx) , & attrs, argument_tys. len ( ) )
183
182
}
184
183
PassMode :: Indirect { attrs, meta_attrs : None , on_stack : false } => {
185
- apply_attrs ( cx. type_ptr_to ( arg. memory_ty ( cx) ) , & attrs, argument_tys. len ( ) )
184
+ apply_attrs ( cx. type_ptr_to ( arg. layout . gcc_type ( cx) ) , & attrs, argument_tys. len ( ) )
186
185
}
187
186
PassMode :: Indirect { attrs, meta_attrs : Some ( meta_attrs) , on_stack } => {
188
187
assert ! ( !on_stack) ;
0 commit comments