@@ -7,7 +7,7 @@ use crate::type_of::{LayoutLlvmExt};
77use rustc_codegen_ssa:: MemFlags ;
88use rustc_codegen_ssa:: mir:: place:: PlaceRef ;
99use rustc_codegen_ssa:: mir:: operand:: OperandValue ;
10- use rustc_target:: abi:: call:: ArgType ;
10+ use rustc_target:: abi:: call:: ArgAbi ;
1111
1212use rustc_codegen_ssa:: traits:: * ;
1313
@@ -163,7 +163,7 @@ impl LlvmType for CastTarget {
163163 }
164164}
165165
166- pub trait ArgTypeExt < ' ll , ' tcx > {
166+ pub trait ArgAbiExt < ' ll , ' tcx > {
167167 fn memory_ty ( & self , cx : & CodegenCx < ' ll , ' tcx > ) -> & ' ll Type ;
168168 fn store (
169169 & self ,
@@ -179,14 +179,14 @@ pub trait ArgTypeExt<'ll, 'tcx> {
179179 ) ;
180180}
181181
182- impl ArgTypeExt < ' ll , ' tcx > for ArgType < ' tcx , Ty < ' tcx > > {
182+ impl ArgAbiExt < ' ll , ' tcx > for ArgAbi < ' tcx , Ty < ' tcx > > {
183183 /// Gets the LLVM type for a place of the original Rust type of
184184 /// this argument/return, i.e., the result of `type_of::type_of`.
185185 fn memory_ty ( & self , cx : & CodegenCx < ' ll , ' tcx > ) -> & ' ll Type {
186186 self . layout . llvm_type ( cx)
187187 }
188188
189- /// Stores a direct/indirect value described by this ArgType into a
189+ /// Stores a direct/indirect value described by this ArgAbi into a
190190 /// place for the original Rust type of this argument/return.
191191 /// Can be used for both storing formal arguments into Rust variables
192192 /// or results of call/invoke instructions into their destinations.
@@ -202,7 +202,7 @@ impl ArgTypeExt<'ll, 'tcx> for ArgType<'tcx, Ty<'tcx>> {
202202 if self . is_sized_indirect ( ) {
203203 OperandValue :: Ref ( val, None , self . layout . align . abi ) . store ( bx, dst)
204204 } else if self . is_unsized_indirect ( ) {
205- bug ! ( "unsized ArgType must be handled through store_fn_arg" ) ;
205+ bug ! ( "unsized ArgAbi must be handled through store_fn_arg" ) ;
206206 } else if let PassMode :: Cast ( cast) = self . mode {
207207 // FIXME(eddyb): Figure out when the simpler Store is safe, clang
208208 // uses it for i16 -> {i8, i8}, but not for i24 -> {i8, i8, i8}.
@@ -279,36 +279,36 @@ impl ArgTypeExt<'ll, 'tcx> for ArgType<'tcx, Ty<'tcx>> {
279279 }
280280}
281281
282- impl ArgTypeMethods < ' tcx > for Builder < ' a , ' ll , ' tcx > {
282+ impl ArgAbiMethods < ' tcx > for Builder < ' a , ' ll , ' tcx > {
283283 fn store_fn_arg (
284284 & mut self ,
285- ty : & ArgType < ' tcx , Ty < ' tcx > > ,
285+ arg_abi : & ArgAbi < ' tcx , Ty < ' tcx > > ,
286286 idx : & mut usize , dst : PlaceRef < ' tcx , Self :: Value >
287287 ) {
288- ty . store_fn_arg ( self , idx, dst)
288+ arg_abi . store_fn_arg ( self , idx, dst)
289289 }
290- fn store_arg_ty (
290+ fn store_arg (
291291 & mut self ,
292- ty : & ArgType < ' tcx , Ty < ' tcx > > ,
292+ arg_abi : & ArgAbi < ' tcx , Ty < ' tcx > > ,
293293 val : & ' ll Value ,
294294 dst : PlaceRef < ' tcx , & ' ll Value >
295295 ) {
296- ty . store ( self , val, dst)
296+ arg_abi . store ( self , val, dst)
297297 }
298- fn memory_ty ( & self , ty : & ArgType < ' tcx , Ty < ' tcx > > ) -> & ' ll Type {
299- ty . memory_ty ( self )
298+ fn arg_memory_ty ( & self , arg_abi : & ArgAbi < ' tcx , Ty < ' tcx > > ) -> & ' ll Type {
299+ arg_abi . memory_ty ( self )
300300 }
301301}
302302
303- pub trait FnTypeLlvmExt < ' tcx > {
303+ pub trait FnAbiLlvmExt < ' tcx > {
304304 fn llvm_type ( & self , cx : & CodegenCx < ' ll , ' tcx > ) -> & ' ll Type ;
305305 fn ptr_to_llvm_type ( & self , cx : & CodegenCx < ' ll , ' tcx > ) -> & ' ll Type ;
306306 fn llvm_cconv ( & self ) -> llvm:: CallConv ;
307307 fn apply_attrs_llfn ( & self , cx : & CodegenCx < ' ll , ' tcx > , llfn : & ' ll Value ) ;
308308 fn apply_attrs_callsite ( & self , bx : & mut Builder < ' a , ' ll , ' tcx > , callsite : & ' ll Value ) ;
309309}
310310
311- impl < ' tcx > FnTypeLlvmExt < ' tcx > for FnType < ' tcx , Ty < ' tcx > > {
311+ impl < ' tcx > FnAbiLlvmExt < ' tcx > for FnAbi < ' tcx , Ty < ' tcx > > {
312312 fn llvm_type ( & self , cx : & CodegenCx < ' ll , ' tcx > ) -> & ' ll Type {
313313 let args_capacity: usize = self . args . iter ( ) . map ( |arg|
314314 if arg. pad . is_some ( ) { 1 } else { 0 } +
@@ -478,10 +478,10 @@ impl<'tcx> FnTypeLlvmExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
478478impl AbiBuilderMethods < ' tcx > for Builder < ' a , ' ll , ' tcx > {
479479 fn apply_attrs_callsite (
480480 & mut self ,
481- ty : & FnType < ' tcx , Ty < ' tcx > > ,
481+ fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
482482 callsite : Self :: Value
483483 ) {
484- ty . apply_attrs_callsite ( self , callsite)
484+ fn_abi . apply_attrs_callsite ( self , callsite)
485485 }
486486
487487 fn get_param ( & self , index : usize ) -> Self :: Value {
0 commit comments